-
1. Re: Need a QuickStart for Spring + Hibernate
adamw Oct 10, 2008 2:43 AM (in response to vbforums)Hello,
I never used Spring, but if anybody would like to contribute such a guide, I'll post it on the website :)
Concerning the JARs, you'll need hibernate entity manager, as it's a dependency of the VersionsReaderFactory. I guess it would be better if there were separate factories for pure hibernate and jpa-hibernate, so that you wouldn't have always to bundle hibernate entity manager when not using it.
And if you don't user JPA, then I guess you'll need hibernate annotations :).
Adam -
2. Re: Need a QuickStart for Spring + Hibernate
vbforums Oct 10, 2008 1:02 PM (in response to vbforums)Hi Adam,
Thanks for your response.
1. Can you please let me know the primary class name which I need to instantiate and is this an Hibernate Event listener or interceptor.
3. Will Envers work in WLS environment.
Thanks,
vbforums -
3. Re: Need a QuickStart for Spring + Hibernate
adamw Oct 13, 2008 3:15 AM (in response to vbforums)Hello,
you don't instantiate anything, you just need to use VersionsReaderFactory. Please see the quickstart: https://www.jboss.org/envers/quickstart.html.
Envers will work wherever Hibernate works, so also in a WLS environment.
Adam -
4. Re: Need a QuickStart for Spring + Hibernate
corneil Nov 19, 2008 6:48 AM (in response to vbforums)Envers does not need anything more than you would use to get Hibernate EntityManager and Spring working.
I use JpaTemplate and JpaDaoSupport so you would use like:getJpaTemplate().execute(new JpaCallback() { public Object doInJpa(EntityManager em) throws PersistenceException { VersionsReader reader = VersionsReaderFactory.get(em); // your code here } }