You may well be right about why these deadlocks not occurring with separate clients. If that's so, is the solution to catch the deadlock exceptions?
And any thoughts about the second stack trace (the iterator one)?
Thanks,
Beau
Dan Christopherson wrote:
These deadlocks are most likely on your entity beans (the second one is fishy looking, but I really can't say much without seeing more (all) of the stack trace.). By default, JBoss only keeps one instance per bean identity, so each transaction from your client will block on the entity. Give the full stack trace, that might be helpful.
launching from different client app instances will change the timings of things, making the deadlock less likely, but perhaps still possible, depending on your application.
Beau Cronin wrote:
There are two messages which appear. The first is:
2003-01-22 11:31:08,725 ERROR [org.jboss.ejb.BeanLock] Application deadlock detected: TransactionImpl:XidImpl [FormatId=257, GlobalId=redbull//3324, BranchQual=] has deadlock conditions. Two or more transactions contending for same resources and each have locks eachother need.
2003-01-22 11:31:08,728 ERROR [org.jboss.ejb.plugins.LogInterceptor] TransactionRolledbackLocalException, causedBy: org.jboss.ejb.plugins.lock.ApplicationDeadlockException: Application deadlock detected: Two or more transactions contention. at org.jboss.ejb.plugins.lock.BeanLockSupport.deadlockDetection(BeanLock
Support.java:136) at org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock.waitForTx(QueuedP
essimisticEJBLock.java:270) at org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock.doSchedule(Queued
PessimisticEJBLock.java:202) at org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock.schedule(QueuedPe
ssimisticEJBLock.java:150)
2003-01-22 11:31:08,725 ERROR [org.jboss.ejb.BeanLock] Application deadlock detected: TransactionImpl:XidImpl [FormatId=257, GlobalId=redbull//3324, BranchQual=] has deadlock conditions. Two or more transactions contending for same resources and each have locks eachother need. 2003-01-22 11:31:08,728 ERROR [org.jboss.ejb.plugins.LogInterceptor] TransactionRolledbackLocalException, causedBy: org.jboss.ejb.plugins.lock.ApplicationDeadlockException: Application deadlock detected: Two or more transactions contention. at org.jboss.ejb.plugins.lock.BeanLockSupport.deadlockDetection(BeanLockSupport.java:136) at org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock.waitForTx(QueuedPessimisticEJBLock.java:270) at org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock.doSchedule(QueuedPessimisticEJBLock.java:202) at org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock.schedule(QueuedPessimisticEJBLock.java:150) at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:103) at org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreationInterceptor.java:69) at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:107) at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:178) at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:60) at fn2.farina.server.perimeter.interceptor.PerimeterLockInterceptor.invoke(Unknown Source) at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:130) at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:204) at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:493) at org.jboss.ejb.plugins.local.BaseLocalContainerInvoker.invoke(BaseLocalContainerInvoker.java:301) at org.jboss.ejb.plugins.local.EntityProxy.invoke(EntityProxy.java:38) at $Proxy1212.getDTO(Unknown Source) at fn2.farina.services.LookupBean.getById(Unknown Source) at fn2.farina.services.LookupBean.getById(Unknown Source) at fn2.farina.services.LookupBean.loadAll(Unknown Source) at java.lang.reflect.Method.invoke(Native Method) at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:660) at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186) at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:77) at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:107) at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:178) at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:60) at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:130) at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:204) at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:313) at org.jboss.ejb.Container.invoke(Container.java:712) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517) at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:382) at java.lang.reflect.Method.invoke(Native Method) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:236) at sun.rmi.transport.Transport$1.run(Transport.java:147) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:143) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701) at java.lang.Thread.run(Thread.java:479)
2003-01-22 11:34:34,190 ERROR [org.jboss.ejb.plugins.LogInterceptor] TransactionRolledbackLocalException, causedBy: java.lang.IllegalStateException: The iterator of a CMR collection may only be used within the transction in which it was created at org.jboss.ejb.plugins.cmp.jdbc.bridge.RelationSet$1.verifyIteratorIsValid(RelationSet.java:309) at org.jboss.ejb.plugins.cmp.jdbc.bridge.RelationSet$1.hasNext(RelationSet.java:269) at fn2.farina.domain.FrameBean.getDTO(Unknown Source) at java.lang.reflect.Method.invoke(Native Method) at org.jboss.ejb.EntityContainer$ContainerInterceptor.invoke(EntityContainer.java:1194) at org.jboss.ejb.plugins.cmp.jdbc.JDBCRelationInterceptor.invoke(JDBCRelationInterceptor.java:95) at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronizationInterceptor.java:297) at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186) at org.jboss.ejb.plugins.EntityReentranceInterceptor.invoke(EntityReentranceInterceptor.java:90) at org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:163) at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:107) at org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreationInterceptor.java:69) at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:107) at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:178) at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:60) at fn2.farina.server.perimeter.interceptor.PerimeterLockInterceptor.invoke(Unknown Source) at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:130) at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:204) at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:493) at org.jboss.ejb.plugins.local.BaseLocalContainerInvoker.invoke(BaseLocalContainerInvoker.java:301) at org.jboss.ejb.plugins.local.EntityProxy.invoke(EntityProxy.java:38) at $Proxy1210.getDTO(Unknown Source) at fn2.farina.services.LookupBean.getById(Unknown Source) at fn2.farina.services.LookupBean.getById(Unknown Source) at fn2.farina.services.LookupBean.loadAll(Unknown Source) at java.lang.reflect.Method.invoke(Native Method) at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:660) at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186) at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:77) at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:107) at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:178) at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:60) at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:130) at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:204) at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:313) at org.jboss.ejb.Container.invoke(Container.java:712) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517) at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:382) at java.lang.reflect.Method.invoke(Native Method) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:236) at sun.rmi.transport.Transport$1.run(Transport.java:147) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:143) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701) at java.lang.Thread.run(Thread.java:479)