These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: org.hibernate.cache.TreeCacheProvider problem
PostPosted: Mon Aug 27, 2007 4:42 am 
Newbie

Joined: Sat Dec 09, 2006 2:01 am
Posts: 1
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.xml

Code:
<?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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.