[jboss-user] [JBoss Cache: Core Edition] - Re: OPTIMISTIC Node Locking Scheme Configuration for EJB3 En

bstansberry@jboss.com do-not-reply at jboss.com
Mon Feb 16 17:14:42 EST 2009


In your persistence.xml use

<property name="hibernate.cache.provider_class" value="org.jboss.ejb3.entity.OptimisticTreeCacheProviderHook"/>

instead of 

<property name="hibernate.cache.provider_class" value="org.jboss.ejb3.entity.TreeCacheProviderHook"/>.

This isn't strictly necessary though. OptimisticTreeCacheProviderHook is a trivial subclass of TreeCacheProviderHook.  Both are able to detect the cache's NodeLockingScheme config and work appropriately.  The only additional behavior in OptimisticTreeCacheProviderHook is it logs a WARN if the cache's NodeLockingScheme isn't OPTIMISTIC, since that suggests the user forgot to change the NodeLockingScheme.

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4210531#4210531

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4210531



More information about the jboss-user mailing list