As I understand it, methods marked as read-only on an entity bean shouldn't try and
lock the bean when they are called. So, if I have two instances of an entity bean
(same bean class, different PK), they can call read-only methods on each other at the
same time.
So, can anyone explain why I'm seeing ApplicationDeadlockExceptions on read-only
methods in my application? Example stack trace:
org.jboss.ejb.plugins.lock.ApplicationDeadlockException: Application deadlock
detected: Two or more transactions contention.
at
org.jboss.ejb.plugins.lock.BeanLockSupport.deadlockDetection(BeanLockSupport.java:138)
at
org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock.waitForTx(QueuedPessimisticEJBLock.java:270)
at
org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock.doSchedule(QueuedPessimisticEJBLock.java:209)
at
org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock.schedule(QueuedPessimisticEJBLock.java:157)
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.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
at
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:243)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:104)
at
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:117)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
at
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
at org.jboss.ejb.EntityContainer.internalInvoke(EntityContainer.java:483)
at org.jboss.ejb.Container.invoke(Container.java:674)
at
org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:353)
at org.jboss.ejb.plugins.local.EntityProxy.invoke(EntityProxy.java:38)
at $Proxy80.getUrlPathNoSlash(Unknown Source)
at
uk.ac.warwick.cms.model.PageLocation.getChildLocations(PageLocation.java:743)
getUrlPathNoSlash() is, as far as I can tell, marked as read-only, and it's basically
just a call to a CMP accessor with a little bit of string parsing
relevant chunk of jboss.xml
<entity>
<ejb-name>PageLocationEntity</ejb-name>
<local-jndi-name>ejb/cms/PageLocationEntity</local-jndi-name>
<method-attributes>
<method-name>get*</method-name>
<read-only>true</read-only>
</method-attributes>
</entity>
Can anyone help, or point me in the right direction?
thanks,
Chris
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user