[jboss-user] [JBossCache] - Concurrency problem

Kain1981 do-not-reply at jboss.com
Sun Jan 28 15:36:25 EST 2007


Hi,

I am using JBoss Cache in a cluster environment.
>From the different PCs within the cluster, the following code is called:

1. get some X from the cache
2. update X (for example, X++)
3. put the updated X back to the cache
4. return X to the client

What I see is when this code is called repeatedly and simultenously from
different PCs, the returned X is sometimes the same as the one on
another PC!

The code is being called from a stateless session bean. Playing with
TransactionAttribute I sometimes got org.jboss.cache.lock.UpgradeException,
sometimes the situation described above.

Here is some of the cache settings:
<attribute name="TransactionManagerLookupClass">org.jboss.cache.JBossTransactionManagerLookup</attribute>
  | <attribute name="IsolationLevel">SERIALIZABLE</attribute>
  | <attribute name="NodeLockingScheme">PESSIMISTIC</attribute>
  | <attribute name="CacheMode">REPL_SYNC</attribute>
  | 

How should I achieve data integrity using TreeCache?

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

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



More information about the jboss-user mailing list