Hello,
I am trying to configure 2nd level, transactional caching for several web applications. These web applications reside on the same server and share the same datamodel (i.e., they are using the same "data" classes, and there is a copy of these classes in each web application).
I am using JBoss 3.2.6 + Hibernate 3.2.5 + JBoss Cache 1.4.1.
Here are some excerpts from my configuration:
applicationContext.xml
Code:
...
<property name="entityCacheStrategies">
<props>
<prop key="com.bics.rdb.model.AccountType">transactional</prop>
<prop key="com.bics.rdb.model.Address">transactional</prop>
...
</props>
</property>
...
<property name="hibernateProperties">
<props>
...
<prop key="hibernate.cache.provider_class">org.hibernate.cache.TreeCacheProvider</prop>
<prop key="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</prop>
<prop key="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</prop>
</props>
</property>
...
treecache.xmlCode:
<?xml version="1.0" encoding="UTF-8"?>
<server>
<mbean code="org.jboss.cache.jmx.CacheJmxWrapper" name="jboss.cache:service=TreeCache">
<depends>jboss:service=Naming</depends>
<depends>jboss:service=TransactionManager</depends>
<attribute name="TransactionManagerLookupClass">org.jboss.cache.transaction.GenericTransactionManagerLookup</attribute>
<attribute name="NodeLockingScheme">PESSIMISTIC</attribute>
<attribute name="IsolationLevel">REPEATABLE_READ</attribute>
<attribute name="CacheMode">LOCAL</attribute>
</mbean>
</server>
(As you can see, I had given up using the optimistic tree cache)
It seems only the last web application started effectively uses the cache.
Am I doing something wrong? Could you please help me?
Kind regards,
Andre Powroznik