[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - timeout for simpleReadWriteEJBLock

_monkey_ do-not-reply at jboss.com
Wed Sep 13 02:25:09 EDT 2006


Hi everyone, I am a newbie in JBOSS, so any help or suggestion would be very much appreciated :)
Previously I found that in my application, when there are 2 threads accessing the bean, deadlock occurs even they were both just trying to read, so I changed the default configuration from pessimistic lock to SimpleReadWriteEJBLock by the following configuration in jboss.xml:
<container-configuration extends="Standard CMP 2.x EntityBean">
<container-name>Standard CMP 2.x EntityBean</container-name>              <locking-policy>org.jboss.ejb.plugins.lock.SimpleReadWriteEJBLock</locking-policy>
</container-configuration>

after making this change, and rerunning the application, instead of deadlock, I get the following transaction timeout error: 

13:54:06,906 WARN  [TransactionImpl] Transaction TransactionImpl:XidImpl[FormatId=257, GlobalId=andrewspc/108, BranchQual=, localId=108] timed out. status=STATUS_ACTIVE
13:54:07,140 WARN  [TransactionImpl] Transaction TransactionImpl:XidImpl[FormatId=257, GlobalId=andrewspc/110, BranchQual=, localId=110] timed out. status=STATUS_ACTIVE
13:54:07,203 ERROR [LogInterceptor] TransactionRolledbackLocalException in method: public abstract java.lang.Integer com.patientrack.ejb.entityBean.AdmissionLocal.getAdmsnPK(), causedBy:
javax.ejb.EJBException: Transaction marked for rollback - probably a timeout.
	at org.jboss.ejb.plugins.lock.SimpleReadWriteEJBLock.checkTransaction(SimpleReadWriteEJBLock.java:326)
	at org.jboss.ejb.plugins.lock.SimpleReadWriteEJBLock.waitAWhile(SimpleReadWriteEJBLock.java:205)
	at org.jboss.ejb.plugins.lock.SimpleReadWriteEJBLock.getWriteLock(SimpleReadWriteEJBLock.java:183)
	at org.jboss.ejb.plugins.lock.SimpleReadWriteEJBLock.schedule(SimpleReadWriteEJBLock.java:89)
	at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:85)
	at org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreationInterceptor.java:53)
	at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
	at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)
	at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)
	at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
	at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:153)
	at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
	at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
	at org.jboss.ejb.EntityContainer.internalInvoke(EntityContainer.java:514)
	at org.jboss.ejb.Container.invoke(Container.java:873)
	at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:415)
	at org.jboss.ejb.plugins.local.EntityProxy.invoke(EntityProxy.java:50)
	at $Proxy123.getAdmsnPK(Unknown Source)
	at com.patientrack.ejb.sessionBean.AdmissionManagerBean.convertAdmissionLocalToAdmission(AdmissionManagerBean.java:3463)
	at com.patientrack.ejb.sessionBean.AdmissionManagerBean.loadAdmissionForAdmsnPk(AdmissionManagerBean.java:1385)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
	at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:214)
	at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:149)
	at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:154)
	at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:54)
	at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
	at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)
	at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)
	at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
	at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:153)
	at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
	at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
	at 


has anyone encountered this kind of problems before? Is there any configuration that I need to pay attention to? Help PLEASE...

THANKS!

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

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



More information about the jboss-user mailing list