Re: [JBoss-user] ApplicationDeadlockException on read-only methods

2003-07-23 Thread julien viet
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>   
CM>  PageLocationEntity
CM>  ejb/cms/PageLocationEntity

CM> 
CM>   get*
CM>   true
CM> 
CM>   

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/psa0013ave/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,
 julienmailto:[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/psa0013ave/direct;at.aspnet_072303_01/01
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] ApplicationDeadlockException on read-only methods

2003-07-23 Thread Chris May
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

  
 PageLocationEntity
 ejb/cms/PageLocationEntity


  get*
  true

  

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/psa0013ave/direct;at.aspnet_072303_01/01
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user