0 Replies Latest reply: Apr 20, 2012 9:53 AM by Tom Muldoon RSS

Is optimistic-entity an inappropriate configuration for a Hibernate 2nd level cache configuration?

Tom Muldoon Newbie

After upgrading jgroups from 2.5.1 to 2.7.0GA, we encountered ClassNotFoundExceptions that we tracked down to class loader issues between swarmcache (our Hibernate 2nd level cache provider) and jgroups. To make a long story short, we’re now attempting a cut over to jboss cache.

 

Some specifics…

 

JBoss AS 5.1.0.GA

hibernate-jbosscache2-3.3.1.GA

jbosscache-core 3.2.5GA

 

With that said, here’s my hibernate configuration in which we ran into DataVersioningExceptions with queries…

 

{code:xml}

      <property name="hibernate.cache.use_second_level_cache" value="true" />

      <property name="hibernate.cache.use_query_cache" value="true" />

      <property name="hibernate.cache.region.jbc2.query.localonly" value="true" />

      <property name="hibernate.cache.region.factory_class" value="org.hibernate.cache.jbc2.MultiplexedJBossCacheRegionFactory" />

      <property name="hibernate.cache.region_prefix" value="hibernate.firstbest" />

{code}

 

Is optimistic-entity an inappropriate configuration for a Hibernate 2nd level cache configuration? Assuming so, how do we deal with the DataVersioningExceptions? Is mvcc-entity a more appropriate configuration?

 

Sincerely, Tom