Exclusive lock is acquired on all nodes not one only
dmary Jun 12, 2008 11:54 AMHi all,
I use TreeCache (JbossCache 1.4.1 SP3 with Jboss 4.0.5GA) with a cache configured in a clustered environnement.
I set in PESSIMISTIC/SERIALIZABLE mode and I want to lock only one node when I read or write to it.
For example, if I have /root/subroot/A and /root/subroot/B, I read node A, I want to have an exclusive lock on it , but I want also to read with another transaction node B.
But at this moment, the cache is entirely locked! I cannot read node B at all.
<?xml version="1.0" encoding="UTF-8" ?>
<server>
 <classpath codebase="./lib" archives="jboss-cache.jar, jgroups.jar" />
 <mbean code="org.jboss.cache.TreeCache" name="jboss.cache:service=MyTreeCache">
 <depends>jboss:service=Naming</depends>
 <depends>jboss:service=TransactionManager</depends>
 <depends>jboss.jca:service=DataSourceBinding,name=my-ds</depends>
 <attribute name="TransactionManagerLookupClass">org.jboss.cache.JBossTransactionManagerLookup</attribute>
 <attribute name="NodeLockingScheme">PESSIMISTIC</attribute>
 <attribute name="IsolationLevel">READ_UNCOMMITTED</attribute>
 <attribute name="CacheMode">REPL_SYNC</attribute>
 <attribute name="ClusterName">
 master-${jboss.partition.name:Cluster}
 </attribute>
 <attribute name="ClusterConfig">
 <config>
 <UDP mcast_addr="${jboss.partition.udpGroup:228.2.2.14}"
 mcast_port="48252" ip_ttl="${jgroups.mcast.ip_ttl:2}"
 ip_mcast="true" mcast_send_buf_size="150000"
 mcast_recv_buf_size="80000" ucast_send_buf_size="150000"
 ucast_recv_buf_size="80000" loopback="false" />
 <PING timeout="2000" num_initial_members="3"
 up_thread="false" down_thread="false" />
 <MERGE2 min_interval="10000" max_interval="20000" />
 <FD shun="true" up_thread="true" down_thread="true" />
 <VERIFY_SUSPECT timeout="1500" up_thread="false"
 down_thread="false" />
 <pbcast.NAKACK gc_lag="50" max_xmit_size="8192"
 retransmit_timeout="600,1200,2400,4800" up_thread="false"
 down_thread="false" />
 <UNICAST timeout="600,1200,2400" window_size="100"
 min_threshold="10" down_thread="false" />
 <pbcast.STABLE desired_avg_gossip="20000"
 up_thread="false" down_thread="false" />
 <FRAG frag_size="8192" down_thread="false"
 up_thread="false" />
 <pbcast.GMS join_timeout="5000"
 join_retry_timeout="2000" shun="true" print_local_addr="true" />
 <pbcast.STATE_TRANSFER up_thread="false"
 down_thread="false" />
 </config>
 </attribute>
 <attribute name="InitialStateRetrievalTimeout">6000</attribute>
 <attribute name="SyncReplTimeout">10000</attribute>
 <attribute name="LockAcquisitionTimeout">4000</attribute>
</mbean>
</server>How can achieve my use case ?
 
    