[jboss-user] [JBoss Cache] New message: ""Unable to acquire lock on Fqn" exception with clustered Pojocache"
Brett Cave
do-not-reply at jboss.com
Wed Mar 10 08:59:25 EST 2010
User development,
A new message was posted in the thread ""Unable to acquire lock on Fqn" exception with clustered Pojocache":
http://community.jboss.org/message/531093#531093
Author : Brett Cave
Profile : http://community.jboss.org/people/brettcave
Message:
--------------------------------------------------------------
When using pojocache in a clustered environment, the attach method throws an exception.
JBoss AS 5.1.0.GA, with pojocache 3.0 and jboss cache 3.1 (casabel).
The attach method works fine in a non-clustered environment, but the moment a second JBoss node is added to the partition, with the pojocache service deployed, any attach calls throw the exception below:
{quote}
....
Caused by: org.jboss.cache.pojo.PojoCacheException: attach failed /rules/9ec2c1bb-e37f-4592-9348-953dc164ed04
at org.jboss.cache.pojo.impl.PojoCacheImpl.attach(PojoCacheImpl.java:111)
at org.jboss.cache.pojo.impl.PojoCacheImpl.attach(PojoCacheImpl.java:93)
at org.jboss.cache.pojo.impl.PojoCacheImpl.attach(PojoCacheImpl.java:88)
at com.mycompany.system.session.PojoCacheManagerBean.writeToCache(PojoCacheManagerBean.java:39)
... 246 more
Caused by: org.jboss.cache.lock.TimeoutException: Unable to acquire lock on Fqn [/rules] after [10000] milliseconds for requestor [GlobalTransaction:<192.168.75.12:46555>:3468]! Lock held by [GlobalTransaction:<192.168.75.12:46555>:3469]
at org.jboss.cache.mvcc.MVCCNodeHelper.acquireLock(MVCCNodeHelper.java:157)
at org.jboss.cache.mvcc.MVCCNodeHelper.wrapNodeForWriting(MVCCNodeHelper.java:235)
at org.jboss.cache.mvcc.MVCCNodeHelper.wrapNodeForWriting(MVCCNodeHelper.java:184)
at org.jboss.cache.mvcc.MVCCNodeHelper.wrapNodeForWriting(MVCCNodeHelper.java:225)
at org.jboss.cache.mvcc.MVCCNodeHelper.wrapNodeForWriting(MVCCNodeHelper.java:184)
{quote}
com.mycompany.system.session.PojoCacheManagerBean.writeToCache:
{code:java}
public void writeToCache(Object ob, String path) {
ObjectName on = new ObjectName("jboss.cache:service=PojoCache");
PojoCache cache = (PojoCacheJmxWrapperMBean) MBeanServerInvocationHandler.newProxyInstance(MBeanServerLocator.locateJBoss(), on, PojoCacheJmxWrapperMBean.class, false).getPojoCache;
cache.attach(ob,path);
}
{code}
pojocache-service.xml:
{code:xml}
<server>
<mbean code="org.jboss.cache.pojo.jmx.PojoCacheJmxWrapper"
name="jboss.cache:service=PojoCache">
<depends>jboss:service=TransactionManager</depends>
<!-- Configure the TransactionManager -->
<attribute name="TransactionManagerLookupClass">
org.jboss.cache.transaction.JBossTransactionManagerLookup
</attribute>
<attribute name="IsolationLevel">REPEATABLE_READ</attribute>
<attribute name="CacheMode">REPL_SYNC</attribute>
<attribute name="ClusterName">PojoCache-${jboss.partition.name:DefaultPartition}</attribute>
<attribute name="ClusterConfig">
<config>
<UDP mcast_addr="228.1.2.3" mcast_port="48866"
ip_ttl="64" 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"/>
<MERGE2 min_interval="10000" max_interval="20000"/>
<FD shun="true"/>
<FD_SOCK/>
<VERIFY_SUSPECT timeout="1500"/>
<pbcast.NAKACK gc_lag="50" retransmit_timeout="600,1200,2400,4800" />
<UNICAST timeout="600,1200,2400,4800" />
<pbcast.STABLE desired_avg_gossip="400000"/>
<FC max_credits="2000000" min_threshold="0.10"/>
<FRAG2 frag_size="8192"/>
<pbcast.GMS join_timeout="5000" shun="true" print_local_addr="true"/>
<pbcast.STATE_TRANSFER/>
</config>
</attribute>
<attribute name="FetchInMemoryState">true</attribute>
<attribute name="InitialStateRetrievalTimeout">15000</attribute>
<attribute name="SyncReplTimeout">15000</attribute>
<attribute name="LockAcquisitionTimeout">10000</attribute>
</mbean>
</server>
{code}
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/531093#531093
More information about the jboss-user
mailing list