Announcement:Envers is now part of Hibernate.
From Hibernate 3.5, Envers is included as a Hibernate core module.
For downloads, please go to the Hibernate downloads page. Envers is also available in JBoss Maven repositories.
Documentation is hosted on the Hibernate docs site.
This page won't be updated in the future. All new releases, documentation updates etc. will be done through the Hibernate site.
You can track Envers updates via the Envers blog.
Envers: Easy Entity Auditing
@Audited. For each audited entity, a table will be created, which will hold the history of changes made to the entity. You can then retrieve and query historical data without much effort.
|
Similarly to Subversion, Envers has a concept of revisions. Basically, one transaction is one revision (unless the transaction didn't modify any audited entities). As the revisions are global, having a revision number, you can query for various entities at that revision, retrieving a (partial) view of the database at that revision. You can find a revision number having a date, and the other way round, you can get the date at which a revision was commited. Envers is a Hibernate core module and works with Hibernate and Hibernate Entity Manager (see hibernate.org). For the auditing to work properly, the entities must have immutable unique identifiers (primary keys). You can use Envers wherever Hibernate works: standalone, inside JBoss AS, with JBoss Seam or Spring. Some of the features:
For a quick tutorial on how to use Envers, see the Quick Start page. On the downloads page, you'll find the jar with the library, the source code, as well as an Envers+Seam demo: a simple wiki application and bi-temporal versioning demo. You can also try a console demo, which is a simple app where you can create, modify and view versions of two simple entities (
|
Blog of Adam Warski
Java and JBoss related stuff- ElasticMQ 0.2 – support for delayed queues and messages
- Jan 12, 2012 11:52 AM by Adam Warski
- ElasticMQ 0.1 released!
- Oct 12, 2011 6:04 AM by Adam Warski
- Envers bundled with JBoss AS 7.0.2!
- Sep 28, 2011 4:05 PM by Adam Warski
- How to handle inheritance and @Audited?
- Sep 8, 2011 8:13 AM by Adam Warski
- Blending Ruby (on Rails) and CDI on OpenBlend 2011
- Sep 8, 2011 4:56 AM by Adam Warski