Bindings, Platforms, and Innovation
This presentation focuses on the Internet and separating myth from fact, history from the future, and the mundane from the imaginative. Bob Frankston presents a vision of what could and should be.
Tracking change and innovation in the enterprise software development community
Posted by Craig Wickesser on Dec 01, 2008 06:42 PM
Envers is an open-source project from JBoss which aims to provide easy versioning of persistent JPA classes. InfoQ provided information about the first GA release, 1.0.0, back in July of 2008. Since then Envers 1.1.0 was released which provided several new features.
The primary focus for the 1.1.0 release was the addition of support for persistent collections. Adam Warski, founder of Envers, described the new feature:
You can now version any relation, collections of “simple” types, maps, etc. All collection mappings defined by JPA are now supported, and most of what Hibernate additionally allows also.
The latest release also included some other improvements and bug fixes, as well as updates to the demos. With the continuing improvements to Envers, there is other news which was the source for this news item. On October 30, 2008 Envers officially became a module of Hibernate. The Envers website, documentation and forum will stay at there original home page for some time to come. The primary major changes were listed by Adam Warski on his blog:
- The code is now in the hibernate-core repository (envers module). There will be no more commits to the old repository.
- Issue tracking moved to Hibernate’s JIRA. All open issues from the old JIRA have been moved there.
- Envers is now built using maven2, which replaces the old ant build
It's exciting times for Adam Warski and other contributors to Envers. The move to the Hibernate family should aid in the continued development of the Envers module and the further expansion into developers toolbelts when it comes to persisting Java objects.
How Java Developers Can Write Great SQL
Usage Landscape: Enterprise Open Source Data Integration
The Role of Open Source in Data Integration
I'm curious, how does envers handles a situation where there's circular references? For example, say we have a model with bi-directional references like this. Person - has a collection of addresses Address - has a reference to the person How does envers know to skip a bidirectional reference and only traverse down the object graph and not back up.
When saving changes, it's only needed to traverse 0 or 1 levels deep (depending on the settings). When loading changes, there is a "first-level cache", so you always attempt to load each entity at a revision once. Hope this answers your question :) Adam
Thanks for responding. I looked for envers design docs late last night and couldn't find any. I finally decided to read the code, but couldn't quite make out the overall design.
It sounds like the @versioned annotation gives users the ability to set the depth. I have another question, which I couldn't figure out from the website or forum.
Say I have a large object graph and all the entities in that graph are versioned. Here is a hypothetical model.
plan
- Customer
- list of addresses
- PlanDetails
- list of services
- PlanRegion
- list of region restrictions
- PlanRestriction
- PlanOptions
- list of optios the customer has
- PlanOption
- ServiceHistory
- list of service calls
- ServiceCall
If I add a new ServiceCall, does it revision the entire graph in the global revision, or does it maintain a parts list?
thanks
peter
Hello, no, only a new revision for ServiceCall will be generated. If the relation with ServiceHistory is bidirectional, and a certain configuation option is set, a revision for ServiceHistory will also be generated. -- Adam
Sounds like Envers maintains a parts list. By that I mean does it keeps a list of all the records (id + version + timestamp) for each global version. I forgot to mention in the previous comment, the entire plan needs to be versioned including all the objects hanging off it. Is my interpretation correct or totally wrong. thanks peter
This presentation focuses on the Internet and separating myth from fact, history from the future, and the mundane from the imaginative. Bob Frankston presents a vision of what could and should be.
This article explores the use of JBoss and jBPM to implement design solutions that effectively address the issue of orchestrating long running activities.
This presentation covers the use of graph databases as an optimal solution for data that is difficult to fit in static tables, rapidly evolving data or data that has a lot of optional attributes.
This session introduces Real Options and shows how it can help in running your project. Real Options is a decision-making process that can be used to manage risk.
This article discusses the use of bindings on services and references (including the instance of non-configured bindings) as the means to implement SCA communications in a Web and SOA environment.
After a short introduction to DSLs, Scott Davis plays with the keyboard showing how to approach the creation of a DSL by typing working snippets of Groovy code that get executed.
IBM Rational and InfoQ present, Scaling Agile with C/ALM, an eBook showing organizations how to become “finely tuned software delivery machines” by enabling team integration and scaling.
Amanda Laucher presents a real life enterprise application written in F#. She shows actual code snippets, explaining design decisions and suggesting how to use some of the F# constructs.
5 comments
Watch Thread Reply