Looking through the 4.0.5 JCA code I think I can see what is happening:
In the CMT case, the onMessage is marked as NotSupported so the JMSServerSession chooses a
LocalDemarcationStrategy even though the connection is an XAConnection.
Then bang,
| javax.jms.TransactionInProgressException: Cannot call commit on an XA session
| at
org.jboss.jms.client.container.TransactionAspect.handleCommit(TransactionAspect.java:97)
| at
org.jboss.aop.advice.org.jboss.jms.client.container.TransactionAspect14.invoke(TransactionAspect14.java)
| at
org.jboss.jms.client.delegate.ClientSessionDelegate$commit_8461082169793485964.invokeNext(ClientSessionDelegate$commit_8461082169793485964.java)
| at
org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:182)
| at
org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:117)
| at
org.jboss.jms.client.delegate.ClientSessionDelegate$commit_8461082169793485964.invokeNext(ClientSessionDelegate$commit_8461082169793485964.java)
| at
org.jboss.jms.client.container.ExceptionInterceptor.invoke(ExceptionInterceptor.java:69)
| at
org.jboss.jms.client.delegate.ClientSessionDelegate$commit_8461082169793485964.invokeNext(ClientSessionDelegate$commit_8461082169793485964.java)
| at
org.jboss.jms.client.container.ClientLogInterceptor.invoke(ClientLogInterceptor.java:107)
| at
org.jboss.jms.client.delegate.ClientSessionDelegate$commit_8461082169793485964.invokeNext(ClientSessionDelegate$commit_8461082169793485964.java)
| at
org.jboss.jms.client.delegate.ClientSessionDelegate.commit(ClientSessionDelegate.java)
| at org.jboss.jms.client.JBossSession.commit(JBossSession.java:165)
| at
org.jboss.resource.adapter.jms.inflow.JmsServerSession$LocalDemarcationStrategy.end(JmsServerSession.java:341)
| at
org.jboss.resource.adapter.jms.inflow.JmsServerSession.run(JmsServerSession.java:260)
| 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)
|
as the ServerSession tries to
call commit() which clearly will fail.
Interestingly the same problem occurs with BMT as well even though no transaction should
have been started at all. BMT doesn't count as an "unspecified tx context"
so the reasoning for starting a tx there shouldn't apply as it does for CMT.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4001328#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...