with QueuedPessimisticEJBLock, read-only shorten the duration of the lock, it does
not remove it. it locks the bean for the duration of the call
instead of the duration of the transaction.

julien

CM> 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
CM> PK), they can call read-only methods on each other at the same time.

CM> So, can anyone explain why I'm seeing ApplicationDeadlockExceptions on read-only 
methods in my application? Example stack trace:

CM> org.jboss.ejb.plugins.lock.ApplicationDeadlockException: Application deadlock 
detected: Two or more transactions contention.
CM>         at 
org.jboss.ejb.plugins.lock.BeanLockSupport.deadlockDetection(BeanLockSupport.java:138)
CM>         at 
org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock.waitForTx(QueuedPessimisticEJBLock.java:270)
CM>         at 
org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock.doSchedule(QueuedPessimisticEJBLock.java:209)
CM>         at 
org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock.schedule(QueuedPessimisticEJBLock.java:157)
CM>         at 
org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:85)
CM>         at 
org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreationInterceptor.java:53)
CM>         at 
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
CM>         at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:243)
CM>         at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:104)
CM>         at 
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:117)
CM>         at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
CM>         at 
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
CM>         at org.jboss.ejb.EntityContainer.internalInvoke(EntityContainer.java:483)
CM>         at org.jboss.ejb.Container.invoke(Container.java:674)
CM>         at 
org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:353)
CM>         at org.jboss.ejb.plugins.local.EntityProxy.invoke(EntityProxy.java:38)
CM>         at $Proxy80.getUrlPathNoSlash(Unknown Source)
CM>         at 
uk.ac.warwick.cms.model.PageLocation.getChildLocations(PageLocation.java:743)


CM> 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

CM> relevant chunk of jboss.xml

CM>       <entity>
CM>          <ejb-name>PageLocationEntity</ejb-name>
CM>          <local-jndi-name>ejb/cms/PageLocationEntity</local-jndi-name>

CM>         <method-attributes>
CM>               <method-name>get*</method-name>
CM>               <read-only>true</read-only>
CM>         </method-attributes>
CM>       </entity>

CM> Can anyone help, or point me in the right direction?

CM> thanks,

CM> Chris



CM> -------------------------------------------------------
CM> This SF.Net email sponsored by: Free pre-built ASP.NET sites including
CM> Data Reports, E-commerce, Portals, and Forums are available now.
CM> Download today and enter to win an XBOX or Visual Studio .NET.
CM> http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
CM> _______________________________________________
CM> JBoss-user mailing list
CM> [EMAIL PROTECTED]
CM> https://lists.sourceforge.net/lists/listinfo/jboss-user



-- 
Best regards,
 julien                            mailto:[EMAIL PROTECTED]



-------------------------------------------------------
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

Reply via email to