activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthias Germann (JIRA)" <j...@apache.org>
Subject [jira] Created: (AMQ-1248) XA Rollback on redelivery does not work with JBoss 4.0.5 MDB
Date Thu, 17 May 2007 09:50:34 GMT
XA Rollback on redelivery does not work with JBoss 4.0.5 MDB
------------------------------------------------------------

                 Key: AMQ-1248
                 URL: https://issues.apache.org/activemq/browse/AMQ-1248
             Project: ActiveMQ
          Issue Type: Bug
          Components: Connector
    Affects Versions: 4.1.1, 4.2.0
         Environment: JDK 1.5.0_10-b03
JBoss 4.0.5.GA
ActiveMQ 4.1.1
ActiveMQ RA 4.1.1


            Reporter: Matthias Germann
         Attachments: activemq-rar-4.1.1.rar.zip, panacya-jms-ds.xml, panacya-mdb-test-1.0.jar

I modified the panacya-mdb-test sample  (http://activemq.apache.org/jboss-integration.data/activemq-jboss-test.zip)
for testing the message redelivery with a JBoss 4.0.5 MDB and ActiveMQ 4.1.1. I modified the
MDB in the sample so thath it throws a RuntimeException if the TextMessage contains the String
"error".

I noticed that the Rollback on a redelivery fails somtetimes with the following exception:
11:25:41,843 WARN  [TransactionImpl] XAException: tx=TransactionImpl:XidImpl[FormatId=257,
GlobalId=LGEMA142/18, BranchQual=, localId=18] errorCode=XAER_RMFAIL
javax.transaction.xa.XAException: The connection is already closed
        at org.apache.activemq.TransactionContext.toXAException(TransactionContext.java:619)
        at org.apache.activemq.TransactionContext.rollback(TransactionContext.java:420)
        at org.apache.activemq.ra.LocalAndXATransaction.rollback(LocalAndXATransaction.java:127)
        at org.jboss.tm.TransactionImpl$Resource.rollback(TransactionImpl.java:2277)
        at org.jboss.tm.TransactionImpl.rollbackResources(TransactionImpl.java:1837)
        at org.jboss.tm.TransactionImpl.rollback(TransactionImpl.java:412)
        at org.jboss.tm.TxManager.rollback(TxManager.java:364)
        at org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor.endTransaction(MessageEndpointInterceptor.java:430)
        at org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor.finish(MessageEndpointInterceptor.java:308)
        at org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor.release(MessageEndpointInterceptor.java:166)
        at org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor.invoke(MessageEndpointInterceptor.java:126)
        at org.jboss.proxy.ClientMethodInterceptor.invoke(ClientMethodInterceptor.java:74)
        at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
        at $Proxy57.release(Unknown Source)
        at org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointDead.enter(MessageEndpointProxy.java:141)
        at org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointState.transition(MessageEndpointProxy.java:99)
        at org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.release(MessageEndpointProxy.java:134)
        at org.apache.activemq.ra.MessageEndpointProxy.release(MessageEndpointProxy.java:69)
        at org.apache.activemq.ra.ServerSessionImpl.close(ServerSessionImpl.java:253)
        at org.apache.activemq.ra.ServerSessionPoolImpl.removeFromPool(ServerSessionPoolImpl.java:185)
        at org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:179)
        at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:204)
        at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:275)
        at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
        at java.lang.Thread.run(Thread.java:595)
Caused by: org.apache.activemq.ConnectionClosedException: The connection is already closed
        at org.apache.activemq.ActiveMQConnection.checkClosed(ActiveMQConnection.java:1245)
        at org.apache.activemq.ActiveMQConnection.checkClosedOrFailed(ActiveMQConnection.java:1232)
        at org.apache.activemq.TransactionContext.rollback(TransactionContext.java:404)
        ... 23 more


Steps for reproducing the problem:
1) unzip activemq-rar-4.1.1.rar.zip into the jboss deploy directory
2) copy panacya-jms-ds.xml to the jboss deploy directory
3) copy panacya-mdb-test-1.0.jar to the jboss deploy directory

4) start activemq
5) start jboss

6) send a Text Message without error to "queue.testQueue" with jconsole (i.e. "Hello World")
=> delivery should work fine: [SimpleMessageReceiverBean] Message received: Hello World

6) send a Text Message containing the text "error" to  "queue.testQueue" with jconsole 
=> in my environment, the first rollback is ok, but the second one fails with javax.transaction.xa.XAException:
The connection is already closed

11:37:03,171 ERROR [LogInterceptor] TransactionRolledbackLocalException in method: public
abstract void javax.jms.MessageListener.onMessage(javax.jms.Message), cause
dBy:
java.lang.RuntimeException: ERROR TEST
        at com.panacya.platform.service.bus.mdb.SimpleMessageReceiverBean.handleMessage(SimpleMessageReceiverBean.java:60)
        at com.panacya.platform.service.bus.mdb.SimpleMessageReceiverBean.onMessage(SimpleMessageReceiverBean.java:39)
        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.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:495)
        at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
        at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:116)
        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.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:109)
        at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
        at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:136)
        at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:402)
        at org.jboss.ejb.Container.invoke(Container.java:954)
        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.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.ejb.plugins.inflow.MessageEndpointInterceptor.delivery(MessageEndpointInterceptor.java:263)
        at org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor.invoke(MessageEndpointInterceptor.java:140)
        at org.jboss.proxy.ClientMethodInterceptor.invoke(ClientMethodInterceptor.java:74)
        at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
        at $Proxy57.onMessage(Unknown Source)
        at org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage(MessageEndpointProxy.java:121)
        at org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpointProxy.java:61)
        at org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:696)
        at org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:165)
        at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:204)
        at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:275)
        at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
        at java.lang.Thread.run(Thread.java:595)
11:37:03,187 ERROR [ActiveMQSession] error dispatching message:
javax.ejb.TransactionRolledbackLocalException: ERROR TEST
        at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:262)
        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.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:109)
        at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
        at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:136)
        at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:402)
        at org.jboss.ejb.Container.invoke(Container.java:954)
        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.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.ejb.plugins.inflow.MessageEndpointInterceptor.delivery(MessageEndpointInterceptor.java:263)
        at org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor.invoke(MessageEndpointInterceptor.java:140)
        at org.jboss.proxy.ClientMethodInterceptor.invoke(ClientMethodInterceptor.java:74)
        at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
        at $Proxy57.onMessage(Unknown Source)
        at org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage(MessageEndpointProxy.java:121)
        at org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpointProxy.java:61)
        at org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:696)
        at org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:165)
        at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:204)
        at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:275)
        at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
        at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.RuntimeException: ERROR TEST
        at com.panacya.platform.service.bus.mdb.SimpleMessageReceiverBean.handleMessage(SimpleMessageReceiverBean.java:60)
        at com.panacya.platform.service.bus.mdb.SimpleMessageReceiverBean.onMessage(SimpleMessageReceiverBean.java:39)
        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.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:495)
        at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
        at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:116)
        at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
        at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
        ... 34 more
11:37:03,187 INFO  [ServerSessionImpl:1] Endpoint failed to process message. Reason: java.lang.RuntimeException:
Endpoint after delivery notification failure
11:37:03,187 WARN  [TransactionImpl] XAException: tx=TransactionImpl:XidImpl[FormatId=257,
GlobalId=LGEMA142/16, BranchQual=, localId=16] errorCode=XAER_RMFAIL
javax.transaction.xa.XAException: The connection is already closed
        at org.apache.activemq.TransactionContext.toXAException(TransactionContext.java:619)
        at org.apache.activemq.TransactionContext.setXid(TransactionContext.java:556)
        at org.apache.activemq.TransactionContext.end(TransactionContext.java:339)
        at org.apache.activemq.ra.LocalAndXATransaction.end(LocalAndXATransaction.java:90)
        at org.jboss.tm.TransactionImpl$Resource.endResource(TransactionImpl.java:2143)
        at org.jboss.tm.TransactionImpl$Resource.endResource(TransactionImpl.java:2118)
        at org.jboss.tm.TransactionImpl.endResources(TransactionImpl.java:1462)
        at org.jboss.tm.TransactionImpl.rollback(TransactionImpl.java:411)
        at org.jboss.tm.TxManager.rollback(TxManager.java:364)
        at org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor.endTransaction(MessageEndpointInterceptor.java:430)
        at org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor.finish(MessageEndpointInterceptor.java:308)
        at org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor.release(MessageEndpointInterceptor.java:166)
        at org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor.invoke(MessageEndpointInterceptor.java:126)
        at org.jboss.proxy.ClientMethodInterceptor.invoke(ClientMethodInterceptor.java:74)
        at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
        at $Proxy57.release(Unknown Source)
        at org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointDead.enter(MessageEndpointProxy.java:141)
        at org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointState.transition(MessageEndpointProxy.java:99)
        at org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.release(MessageEndpointProxy.java:134)
        at org.apache.activemq.ra.MessageEndpointProxy.release(MessageEndpointProxy.java:69)
        at org.apache.activemq.ra.ServerSessionImpl.close(ServerSessionImpl.java:253)
        at org.apache.activemq.ra.ServerSessionPoolImpl.removeFromPool(ServerSessionPoolImpl.java:185)
        at org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:179)
        at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:204)
        at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:275)
        at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
        at java.lang.Thread.run(Thread.java:595)
Caused by: org.apache.activemq.ConnectionClosedException: The connection is already closed
        at org.apache.activemq.ActiveMQConnection.checkClosed(ActiveMQConnection.java:1245)
        at org.apache.activemq.ActiveMQConnection.checkClosedOrFailed(ActiveMQConnection.java:1232)
        at org.apache.activemq.TransactionContext.setXid(TransactionContext.java:553)
        ... 25 more
11:37:03,203 WARN  [TransactionImpl] XAException: tx=TransactionImpl:XidImpl[FormatId=257,
GlobalId=LGEMA142/16, BranchQual=, localId=16] errorCode=XAER_RMFAIL
javax.transaction.xa.XAException: The connection is already closed
        at org.apache.activemq.TransactionContext.toXAException(TransactionContext.java:619)
        at org.apache.activemq.TransactionContext.rollback(TransactionContext.java:420)
        at org.apache.activemq.ra.LocalAndXATransaction.rollback(LocalAndXATransaction.java:127)
        at org.jboss.tm.TransactionImpl$Resource.rollback(TransactionImpl.java:2277)
        at org.jboss.tm.TransactionImpl.rollbackResources(TransactionImpl.java:1837)
        at org.jboss.tm.TransactionImpl.rollback(TransactionImpl.java:412)
        at org.jboss.tm.TxManager.rollback(TxManager.java:364)
        at org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor.endTransaction(MessageEndpointInterceptor.java:430)
        at org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor.finish(MessageEndpointInterceptor.java:308)
        at org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor.release(MessageEndpointInterceptor.java:166)
        at org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor.invoke(MessageEndpointInterceptor.java:126)
        at org.jboss.proxy.ClientMethodInterceptor.invoke(ClientMethodInterceptor.java:74)
        at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
        at $Proxy57.release(Unknown Source)
        at org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointDead.enter(MessageEndpointProxy.java:141)
        at org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointState.transition(MessageEndpointProxy.java:99)
        at org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.release(MessageEndpointProxy.java:134)
        at org.apache.activemq.ra.MessageEndpointProxy.release(MessageEndpointProxy.java:69)
        at org.apache.activemq.ra.ServerSessionImpl.close(ServerSessionImpl.java:253)
        at org.apache.activemq.ra.ServerSessionPoolImpl.removeFromPool(ServerSessionPoolImpl.java:185)
        at org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:179)
        at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:204)
        at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:275)
        at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
        at java.lang.Thread.run(Thread.java:595)
Caused by: org.apache.activemq.ConnectionClosedException: The connection is already closed
        at org.apache.activemq.ActiveMQConnection.checkClosed(ActiveMQConnection.java:1245)
        at org.apache.activemq.ActiveMQConnection.checkClosedOrFailed(ActiveMQConnection.java:1232)
        at org.apache.activemq.TransactionContext.rollback(TransactionContext.java:404)
        ... 23 more



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message