-
1. Re: JBoss hangs on findByPrimaryKey
danmartin Jun 21, 2002 3:58 AM (in response to danmartin)I let the AS working after the supposed deadlock.
This is the stack of the EB's calls:
javax.transaction.TransactionRolledbackException: Transaction marked for rollback, possibly a timeout; nested exception is:
java.lang.RuntimeException: Transaction marked for rollback, possibly a timeout
javax.transaction.TransactionRolledbackException: Transaction marked for rollback, possibly a timeout; nested exception is:
java.lang.RuntimeException: Transaction marked for rollback, possibly a timeout
java.lang.RuntimeException: Transaction marked for rollback, possibly a timeout
at org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock.waitForTx(QueuedPessimisticEJBLock.java:291)
at org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock.doSchedule(QueuedPessimisticEJBLock.java:169)
at org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock.schedule(QueuedPessimisticEJBLock.java:137)
at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:121)
at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:138)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:347)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:100)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:127)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:170)
at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:428)
at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:504)
at org.jboss.ejb.plugins.jrmp.interfaces.GenericProxy.invokeContainer(GenericProxy.java:335)
at org.jboss.ejb.plugins.jrmp.interfaces.EntityProxy.invoke(EntityProxy.java:133)
at $Proxy72.MYFUNCTION(Unknown Source)
And this is the stack received by the special client starting the long time procedure:
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.ServerException: Container exception. Notify the container developers :-); nested exception is:
java.lang.IllegalStateException: No transaction.
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.ServerException: Container exception. Notify the container developers :-); nested exception is:
java.lang.IllegalStateException: No transaction.
java.rmi.ServerException: Container exception. Notify the container developers :-); nested exception is:
java.lang.IllegalStateException: No transaction.
java.lang.IllegalStateException: No transaction.
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:240)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:215)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:117)
at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker_Stub.invoke(Unknown Source)
at org.jboss.ejb.plugins.jrmp.interfaces.GenericProxy.invokeContainer(GenericProxy.java:357)
at org.jboss.ejb.plugins.jrmp.interfaces.EntityProxy.invoke(EntityProxy.java:133)
at $Proxy11.MYFUNCTION()
Let me know if I should start migration to another AS, please!!
PS: I'm using JBoss 2.4.4+Tomcat
Hope to get news .... -
2. Re: JBoss hangs on findByPrimaryKey
jzimon Jun 24, 2002 9:07 AM (in response to danmartin)I don't know if you call findAll() in th the same transaction context as subsequent bussiness methods
on EJBs found. If it's true than deadlock might occur
when you call 2 such procedures simultaneously. findAll() returned collections may have different remote interface order, so you get a deadlock. A solution requires a change in trans-attr to RequiresNew of your Entities.
Othre way is to process EJBs returned from findAll() in the same order. I can't find in the spec if order of RemoteInterfaces is the same as this of Primary Key objects returned from finder - so you should probably sort RemoteInterfaces on the "caller side".