[jboss-user] [EJB/JBoss] - UserTransaction status not updated properly under deadlock?

Mr_Anonymous do-not-reply at jboss.com
Thu Apr 5 16:23:04 EDT 2007


I am making use of UserTransactions in some of non EJB classes which call
out to various session beans. Basically, this lets me group all the session
bean calls into one transaction.

What is happening is that one of the calls is throwing an exception which
causes the transaction to rollback. From that point on, the UserTransaction
status is always ROLLEDBACK. That is, if I perform the action again which
ought to start a new transaction, when I get the UserTransaction it has a
status of ROLLEDBACK.

When I do this exact same operation under WebLogic, the status is
NO_TRANSACTION, and so the op proceeds until the exception is hit again.
Under JBoss, the trans.begin() call throws an exception.

This scenario is, I believe, deadlock related; a simple test of throwing a
runtime exception works like it does under WebLogic.  Does JBoss do
things differently to the UserTransaction in a deadlock situation?

If it helps, I've included the error and some of the stack below:

2007-04-05 15:15:01-ERROR org.jboss.ejb.plugins.cmp.jdbc.JDBCInsertPKCreateCommand(104) Error checking if entity exists
org.jboss.util.NestedSQLException: Transaction is not active: tx=TransactionImple < ac, BasicAction: a03092c:c57:461555da:e1 status: ActionS
tatus.ABORTED >; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: a0
3092c:c57:461555da:e1 status: ActionStatus.ABORTED >)
        at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:94)
        at org.jboss.ejb.plugins.cmp.jdbc.JDBCInsertPKCreateCommand.beforeInsert(JDBCInsertPKCreateCommand.java:84)
        at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand.execute(JDBCAbstractCreateCommand.java:150)
        at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createEntity(JDBCStoreManager.java:587)
        at org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManager.java:237)
        at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.createEntity(CachedConnectionInterceptor.java:225)
        at org.jboss.ejb.EntityContainer.createLocalHome(EntityContainer.java:625)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
        at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1126)
        at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:105)
        at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:203)
        at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:189)
        at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:105)
        at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:134)
        at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:76)
        at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:43)
        at org.jboss.ejb.plugins.CallValidationInterceptor.invokeHome(CallValidationInterceptor.java:56)
        at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:125)
        at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:378)
        at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:161)
        at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:145)
        at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:132)
        at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:107)
        at org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java:521)
        at org.jboss.ejb.Container.invoke(Container.java:974)
        at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invokeHome(BaseLocalProxyFactory.java:359)
        at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:133)
        at $Proxy526.create(Unknown Source)
        at com.prioritytech.domain.process.beans.AuditServicesBean.createAudit(AuditServicesBean.java:179)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
        at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:237)
        at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
        at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:169)
        at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
        at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
        at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
        at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
        at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
        at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
        at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:136)
        at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
        at org.jboss.ejb.Container.invoke(Container.java:953)
        at sun.reflect.GeneratedMethodAccessor162.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
        at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
        at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:169)
        at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:118)
        at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:209)
        at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:195)
        at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
        at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:70)
        at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:112)
        at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
        at $Proxy1434.createAudit(Unknown Source)


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4035160#4035160

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4035160



More information about the jboss-user mailing list