2 Replies Latest reply on Mar 23, 2003 10:47 PM by David Jencks

    JBoss calling Rollback instead of commit?

    John C. Kendall Newbie

      Any idea why container is calling rollback even though EJB method is returning successfully?

      See trace below.

      Environment
      Jboss 3.0.6/jdk1.4
      Container managed tx session EJB
      LocalTransaction based Adapter (custom)

      Notes:
      1. No errors during deployment
      2. Both the EJB and the Adapter are registered in JNDI
      3. Clicking on "jboss.jca name=EagleIQ Adapter,service=RARDeployment" in the jmx-console yields the following:
      HTTP ERROR: 500 No such attribute: RARMetaDataElement
      4. The EJB is successfully returning the data from its sendData method.

      ------------------------------
      TRACE
      13:56:19,761 INFO [STDOUT] IqEjbWorkerBean: setSessionContext
      13:56:19,775 INFO [STDOUT] IqEjbWorkerBean: sendData called
      13:56:19,776 INFO [STDOUT] IqEjbWorkerBean: getting enc
      13:56:19,778 INFO [STDOUT] IqEjbWorkerBean: getting iqConnection factory
      13:56:19,780 INFO [STDOUT] IqEjbWorkerBean: getting iqConnection
      13:56:19,799 INFO [STDOUT] IqManagedConnectionFactory: equals: /mnt/eiqprod/d/iqrpc/bin/IqServers.xml
      13:56:19,800 INFO [STDOUT] IqManagedConnectionFactory: getServerConfigFile: /mnt/eiqprod/d/iqrpc/bin/IqServers.xml
      13:56:19,801 INFO [LocalTxConnectionManager] getManagedConnection returning unassociated connection
      13:56:19,844 INFO [STDOUT] IqManagedConnectionFactory: createManagedConnections: conn1
      13:56:19,859 INFO [STDOUT] IqManagedConnection (com.solvepoint.iqrpc.server.ra.IqManagedConnection@2f529b): constructor: conn1
      13:56:19,876 INFO [STDOUT] com.solvepoint.iqrpc.server.IqRpcDelegate.constructor:called
      13:56:19,898 INFO [LocalTxConnectionManager$LocalConnectionEventListener] enlisting currenttx: TransactionImpl:XidImpl [FormatId=257, GlobalId=merlin//1, BranchQual=], cel: org.jboss.resource.connectionmanager.LocalTxConnectionManager$LocalConnectionEventListener@e03a61
      13:56:19,901 INFO [STDOUT] IqManagedConnection (com.solvepoint.iqrpc.server.ra.IqManagedConnection@2f529b): getLocalTransaction
      13:56:19,910 INFO [STDOUT] IqLocalTransaction (null): constructor
      13:56:19,911 INFO [STDOUT] IqLocalTransaction (com.solvepoint.iqrpc.server.ra.IqManagedConnection@2f529b): begin
      13:56:19,918 INFO [STDOUT] IqManagedConnection (com.solvepoint.iqrpc.server.ra.IqManagedConnection@2f529b): sending start event
      13:56:19,927 INFO [STDOUT] IqManagedConnection (com.solvepoint.iqrpc.server.ra.IqManagedConnection@2f529b): getConnection: conn1
      13:56:19,937 INFO [STDOUT] IqConnectionImpl (com.solvepoint.iqrpc.server.ra.IqConnectionImpl@af8b32): constructor
      13:56:19,941 INFO [STDOUT] IqEjbWorkerBean: getting response
      13:56:19,943 INFO [STDOUT] IqEjbWorkerBean: returning response: Success
      13:56:19,948 INFO [STDOUT] IqConnectionImpl (com.solvepoint.iqrpc.server.ra.IqConnectionImpl@af8b32): close called
      13:56:19,949 INFO [STDOUT] IqConnectionImpl (com.solvepoint.iqrpc.server.ra.IqConnectionImpl@af8b32): removing handle
      13:56:19,950 INFO [STDOUT] IqConnectionImpl (com.solvepoint.iqrpc.server.ra.IqConnectionImpl@af8b32): sending closed event
      13:56:19,951 INFO [STDOUT] IqManagedConnection (com.solvepoint.iqrpc.server.ra.IqManagedConnection@2f529b): sending close event
      13:56:19,953 INFO [STDOUT] IqConnectionImpl (com.solvepoint.iqrpc.server.ra.IqConnectionImpl@af8b32): close event sent
      13:56:19,955 WARN [TxCapsule] XAException: tx=XidImpl [FormatId=257, GlobalId=merlin//1, BranchQual=] errorCode=XA_UNKNOWN(0)
      javax.transaction.xa.XAException: wrong xid in rollback: expected: null, got: XidImpl [FormatId=257, GlobalId=merlin//1, BranchQual=1]
      at org.jboss.resource.connectionmanager.LocalTxConnectionManager$LocalConnectionEventListener.rollback(LocalTxConnectionManager.java:650)
      at org.jboss.tm.TxCapsule.rollbackResources(TxCapsule.java:1779)
      at org.jboss.tm.TxCapsule.rollback(TxCapsule.java:475)
      at org.jboss.tm.TransactionImpl.rollback(TransactionImpl.java:83)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:241)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:92)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:130)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:204)
      at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:313)
      at org.jboss.ejb.Container.invoke(Container.java:712)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:382)
      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:324)
      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
      at sun.rmi.transport.Transport$1.run(Transport.java:148)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
      at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
      at java.lang.Thread.run(Thread.java:536)