1 Reply Latest reply on Nov 18, 2008 5:45 AM by Manik Surtani

    OptimisticTreeCacheProviderHook vs OptimisticTreeCacheProvid

    Hossein Attar Newbie

      I am trying to use OPTIMISTIC NODE LOCKING for my second level cache. Based on what I have read, using

      property name="hibernate.cache.provider_class" value="org.hibernate.cache.OptimisticTreeCacheProvider"

      in persistence.xml and providing an XML config file using

      property name="hibernate.cache.opt_tree_cache.config" value="..."

      works, but it results in having a cache that is not managed by the app server. To avoid that problem, is it correct/enough to use
      org.jboss.ejb3.entity.OptimisticTreeCacheProviderHook as my cache.provider_class and change the ejb3-entity-cache-service.xml in my deploy directory to use OPTIMISTIC NODE LOCKING? I did that and didn't get any errors, but I'm not sure if it gives me real OPTMISTIC NODE LOCKING behavior.

      I'm using JBoss AS 4.2.3 and Hibernate 3.3.1.

      Thanks a lot