views:

53

answers:

1

I have entities that required versioning support and from time to time, i will need to retrieve old version of the entity . should i just use

options available

1. http://stackoverflow.com/questions/762405/database-data-versioning
2. jboss envers  (can this be used on any web server,tomcat,jetty, appengine) ?
3. any similar library like jboss envers that ease to do versioning?
+1  A: 

JBoss Envers can be used always when you're using Hibernate as the persistence provider. It's actually bundled with the new Hibernate 3.5. Envers is a an excellent tool, but I has one drawback - you can version only entities that aggregate versioned entities. This means that if you want to version Entity A and it has fields of types B and C, which are also entities - B and C should be versioned by envers as well - if your entities have a tight coupling(which is bad design, but is fairly possible) you'll have to version the whole project and there is some overhead to that.

We personally opted for a lighter custom versioning solution after we investigated Envers, but if it fits your bill - you should definitely use it. I'm not aware of other tools offering its capabilities.

Bozhidar Batsov
Can you provide a little bit more as to your custom solution?
boyd4715