JBoss Community

JCA Spec violation using resource-adapter in JBoss 7?

created by jleinawe in IronJacamar - View the full discussion

JBoss AS 7.1.1.Final-SNAPSHOT

JBoss IronJacamar 1.0.8.Final

 

Testing a JMS resource-adapter deployed to JBoss which will use WebLogic as the JMS provider.  In a transacted MDB test, this error appears in the JBoss log (which is attached) when the MDB tries to send and outbound reply message

 

11:18:24,023 ERROR [stderr] (default-short-running-threads-threads - 1) javax.transaction.xa.XAException: J2EE GJRA-01501: cause = Attempt to start a transaction while in an active (global or local) transaction.; action = Complete current transaction before starting another

 

 

By analysis our RA's own tracing, this looks like a JCA spec violation.  xaResourceWrapper2 (the XAResource for managedConnectionImpl0) is being enlisted with xid3.  Then without delisting xaResourceWrapper2, jboss is doing a managedConnectionImpl0.cleanup() call (which is a JCA spec violation).  Then later when it tries to enlist xaResourceWrapper2 with xid5, that fails because xaResourceWrapper2 is still enlisted with xid3.  (That enlistment attempt is not even getting to WebLogic JMS because the RA is detecting the XA protocol violation.)

 

Excerpts from log:

 

   out:MessageEndpoint.beforeDelivery(public abstract void javax.jms.MessageListener.onMessage(javax.jms.Message)) #4 @1361560688075..1361560688295
      in:xaResourceWrapper0.setTransactionTimeout(300) -> true #4 @1361560688102..1361560688173
         out:XAResource.setTransactionTimeout(300) -> true #4 @1361560688126..1361560688155
      in:xaResourceWrapper0.start(xid3,0) #4 @1361560688191..1361560688277 [TMNOFLAGS]
         out:XAResource.start(xid3,0) #4 @1361560688223..1361560688260     [TMNOFLAGS]
   [...]
   out:MessageListener.onMessage(genericStreamMessage0) #1 @1361560697008..1361560702586
      in:wlxaQueueConnectionFactory0.createConnection() -> wlConnection0 #1 @1361560698037..1361560700740
         out:ConnectionManager.allocateConnection(wlManagedXAQueueConnectionFactory0,connectionRequestInfoImpl0) -> wlConnection0 #1 @1361560698093..1361560700687
            [...]
            in:managedConnectionImpl0.getXAResource() -> xaResourceWrapper2 #1 @1361560699619..1361560699675
            [...]
            in:xaResourceWrapper2.start(xid3,2097152) #6 @1361560700092..1361560700275 [TMJOIN]
               out:XAResource.start(xid3,2097152) #6 @1361560700157..1361560700226     [TMJOIN]
   [...]
   out:MessageEndpoint.afterDelivery() #4 @1361560702595..1361560702930
      in:xaResourceWrapper0.end(xid3,67108864) #4 @1361560702612..1361560702709 [TMSUCCESS]
         out:XAResource.end(xid3,67108864) #5 @1361560702649..1361560702688     [TMSUCCESS]
      in:xaResourceWrapper0.commit(xid3,true) #4 @1361560702729..1361560702851
         out:XAResource.commit(xid3,true) #4 @1361560702766..1361560702830
      in:managedConnectionImpl0.cleanup() #1 @1361560702871..1361560702904 [JCA spec violation]
   out:MessageEndpoint.beforeDelivery(public abstract void javax.jms.MessageListener.onMessage(javax.jms.Message)) #6 @1361560702938..1361560703159
      [...]
   out:MessageConsumer.receive(15000) -> TextMessage[ID:<384827.1361560696991.0>, null] #6 @1361560703168..1361560703201
   out:MessageListener.onMessage(genericTextMessage0) #2 @1361560703226..1361560704964
      in:wlxaQueueConnectionFactory0.createConnection() threw #2 @1361560703250..1361560704672
         out:ConnectionManager.allocateConnection(wlManagedXAQueueConnectionFactory0,connectionRequestInfoImpl0) threw #2 @1361560703307..1361560704447
            [...]
            in:xaResourceWrapper2.start(xid5,2097152) threw #8 @1361560703786..1361560703871 [TMJOIN]

Reply to this message by going to Community

Start a new discussion in IronJacamar at Community