0 Replies Latest reply on Jan 31, 2007 4:17 AM by j.hedin

    JBoss cache tuning with RC9 patch 1, cluster and Optimistic

      Hi

      We use JBoss 4.0.5.GA + EJB3 RC9 patch 1 + JBoss Cache 1.4.1.GA in a cluster with two nodes. All our entity EJBs are Optimistic locked via @Version. However, the cache looks like it uses pessimistic locks during the whole transaction. Is the JBoss Cache in conflict with the @Version annotation? How should I tune the JBoss cache? I would like to set

      locking: OPTIMISTIC
      replication: INVALID_SYNC

      is that safe with EJB3 entities?

      My persistence.xml

      <?xml version="1.0" encoding="UTF-8"?>
      <!-- $Id: persistence.xml,v 1.3 2006/06/27 15:07:45 johan Exp $ -->
      <persistence>
       <persistence-unit name="IBCS">
       <jta-data-source>java:/IBDS</jta-data-source>
       <properties>
       <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLInnoDBDialect"/>
       <property name="hibernate.hbm2ddl.auto" value="none"/>
       <property name="hibernate.cache.provider_class" value="org.jboss.ejb3.entity.TreeCacheProviderHook"/>
       <property name="hibernate.treecache.mbean.object_name" value="jboss.cache:service=EJB3EntityTreeCache"/>
       </properties>
       </persistence-unit>
      </persistence>