1 2 Previous Next 27 Replies Latest reply on Aug 11, 2006 6:37 AM by marklittle

    Distributed transaction not rolledBack

    trecloux

      Hello all,

      We are testing the JBoss AS, and we need the transaction to be ditributed against multiple virtual machines.

      We wrote a test app with a webapp calling a first ejb method wich is calling an other ejb method.

      The three modules are located on different boxes, the ejbs methods are in "required" mode.

      The JBoss As is in 4.0.3SP1 version and JBoss Transaction in 4.2.1GA.

      Each Ejb method is updating a DB2 database using an XA Datasource

      The scenario is
      - EJB A is updating db
      - EJB A calls EJB B
      - EJB B is updating db
      - EJB B returns
      - EJB A calls setRollBackOnly
      - EJB A returns

      The EJB A update is rolledBack but the EJB B update is commited.

      The applications have been tested with success against our current AS.

      Can you help me ?

        • 1. Re: Distributed transaction not rolledBack
          marklittle

          Unfortunately DB2 is not one of our supported databases at this time. This may or may not be the root cause of your problem, so if you can switch in Oracle or SQLServer and get the same behaviour we can look into it.

          • 2. Re: Distributed transaction not rolledBack
            trecloux

            I tryed with an oracle DB and I got this error
            [Entering in the bean method]
            ....
            2006-08-07 18:04:22,761 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] internalRegisterPool: registering pool with interval 900000 old interval: 9223372036854775807
            2006-08-07 18:04:22,761 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] internalRegisterPool: about to notify thread: old next: 1154967112761, new next: 1154967112761
            2006-08-07 18:04:22,761 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] run: IdleRemover notifying pools, interval: 450000
            ....

            2006-08-07 18:04:55,531 WARN [com.arjuna.ats.jta.logging.loggerI18N] [com.arjuna.ats.internal.jta.transaction.arjunacore.enliststarterror] [com.arjuna.ats.internal.jta.transaction.arjunacore.enliststarterror] TransactionImple.enlistResource - XAResource.start returned: XAException.XAER_RMERR for < 131075, 27, 25, 1--53ebebff:828:44d7641d:59-53ebebff:828:44d7641d:70
            ... blank lines ...
            >
            2006-08-07 18:04:55,531 INFO [STDOUT] javax.transaction.SystemException: TransactionImple.enlistResource - XAResource.start [com.arjuna.ats.internal.jta.transaction.arjunacore.couldnotregister] [com.arjuna.ats.internal.jta.transaction.arjunacore.couldnotregister] could not register transaction: < 131075, 27, 25, 1--53ebebff:828:44d7641d:59-53ebebff:828:44d7641d:70
            ... blank lines ...
            >
            2006-08-07 18:04:55,531 INFO [STDOUT] at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource(TransactionImple.java:706)
            2006-08-07 18:04:55,531 INFO [STDOUT] at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource(TransactionImple.java:408)
            2006-08-07 18:04:55,531 INFO [STDOUT] at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener$TransactionSynchronization.enlist(TxConnectionManager.java:771)
            2006-08-07 18:04:55,531 INFO [STDOUT] at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.enlist(TxConnectionManager.java:590)
            2006-08-07 18:04:55,531 INFO [STDOUT] at org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:367)
            2006-08-07 18:04:55,531 INFO [STDOUT] at org.jboss.resource.connectionmanager.BaseConnectionManager2.reconnectManagedConnection(BaseConnectionManager2.java:598)
            2006-08-07 18:04:55,531 INFO [STDOUT] at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:465)
            2006-08-07 18:04:55,531 INFO [STDOUT] at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:894)
            2006-08-07 18:04:55,531 INFO [STDOUT] at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:73)
            2006-08-07 18:04:55,531 INFO [STDOUT] at fr.norsys.applitest.commons.dao.AppliTestDAO.updateLogTAble(AppliTestDAO.java:28)
            2006-08-07 18:04:55,531 INFO [STDOUT] at fr.norsys.applitest.alpha.AlphaBean.simpleTx(AlphaBean.java:65)
            2006-08-07 18:04:55,531 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            2006-08-07 18:04:55,547 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            2006-08-07 18:04:55,547 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            2006-08-07 18:04:55,547 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:324)
            2006-08-07 18:04:55,547 INFO [STDOUT] at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
            2006-08-07 18:04:55,547 INFO [STDOUT] at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:214)
            2006-08-07 18:04:55,547 INFO [STDOUT] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:149)
            2006-08-07 18:04:55,547 INFO [STDOUT] at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:154)
            2006-08-07 18:04:55,547 INFO [STDOUT] at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:54)
            2006-08-07 18:04:55,547 INFO [STDOUT] at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
            2006-08-07 18:04:55,547 INFO [STDOUT] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)
            2006-08-07 18:04:55,547 INFO [STDOUT] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)
            2006-08-07 18:04:55,547 INFO [STDOUT] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
            2006-08-07 18:04:55,547 INFO [STDOUT] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:153)
            2006-08-07 18:04:55,547 INFO [STDOUT] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
            2006-08-07 18:04:55,547 INFO [STDOUT] at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
            2006-08-07 18:04:55,547 INFO [STDOUT] at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
            2006-08-07 18:04:55,547 INFO [STDOUT] at org.jboss.ejb.Container.invoke(Container.java:873)
            2006-08-07 18:04:55,547 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            2006-08-07 18:04:55,547 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            2006-08-07 18:04:55,547 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            2006-08-07 18:04:55,547 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:324)
            2006-08-07 18:04:55,547 INFO [STDOUT] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
            2006-08-07 18:04:55,547 INFO [STDOUT] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
            2006-08-07 18:04:55,547 INFO [STDOUT] at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
            2006-08-07 18:04:55,547 INFO [STDOUT] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
            2006-08-07 18:04:55,547 INFO [STDOUT] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
            2006-08-07 18:04:55,547 INFO [STDOUT] at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:805)
            2006-08-07 18:04:55,547 INFO [STDOUT] at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:406)
            2006-08-07 18:04:55,547 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            2006-08-07 18:04:55,547 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            2006-08-07 18:04:55,547 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            2006-08-07 18:04:55,547 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:324)
            2006-08-07 18:04:55,547 INFO [STDOUT] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
            2006-08-07 18:04:55,547 INFO [STDOUT] at sun.rmi.transport.Transport$1.run(Transport.java:148)
            2006-08-07 18:04:55,547 INFO [STDOUT] at java.security.AccessController.doPrivileged(Native Method)
            2006-08-07 18:04:55,547 INFO [STDOUT] at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
            2006-08-07 18:04:55,547 INFO [STDOUT] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
            2006-08-07 18:04:55,547 INFO [STDOUT] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
            2006-08-07 18:04:55,547 INFO [STDOUT] at java.lang.Thread.run(Thread.java:534)
            2006-08-07 18:04:55,547 DEBUG [org.jboss.util.NestedThrowable] org.jboss.util.NestedThrowable.parentTraceEnabled=true
            2006-08-07 18:04:55,547 DEBUG [org.jboss.util.NestedThrowable] org.jboss.util.NestedThrowable.nestedTraceEnabled=false
            2006-08-07 18:04:55,547 DEBUG [org.jboss.util.NestedThrowable] org.jboss.util.NestedThrowable.detectDuplicateNesting=true
            2006-08-07 18:04:55,547 ERROR [org.jboss.ejb.plugins.LogInterceptor] RuntimeException in method: public abstract void fr.norsys.applitest.alpha.Alpha.simpleTx() throws java.rmi.RemoteException:
            java.lang.RuntimeException: Erreur dans le DAO
            at fr.norsys.applitest.commons.dao.AppliTestDAO.updateLogTAble(AppliTestDAO.java:37)
            at fr.norsys.applitest.alpha.AlphaBean.simpleTx(AlphaBean.java:65)
            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 org.jboss.invocation.Invocation.performCall(Invocation.java:345)
            at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:214)
            at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:149)
            at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:154)
            at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:54)
            at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
            at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)
            at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)
            at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
            at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:153)
            at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
            at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
            at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
            at org.jboss.ejb.Container.invoke(Container.java:873)
            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 org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
            at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
            at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
            at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
            at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:805)
            at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:406)
            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:534)
            Caused by: org.jboss.util.NestedSQLException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: -53ebebff:828:44d7641d:59 status: 3 >); - nested throwable: (org.jboss.resource.JBossResourceException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: -53ebebff:828:44d7641d:59 status: 3 >))
            at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:79)
            at fr.norsys.applitest.commons.dao.AppliTestDAO.updateLogTAble(AppliTestDAO.java:28)
            ... 41 more
            Caused by: org.jboss.resource.JBossResourceException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: -53ebebff:828:44d7641d:59 status: 3 >)
            at org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:373)
            at org.jboss.resource.connectionmanager.BaseConnectionManager2.reconnectManagedConnection(BaseConnectionManager2.java:598)
            at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:465)
            at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:894)
            at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:73)
            ... 42 more
            Caused by: javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: -53ebebff:828:44d7641d:59 status: 3 >
            at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener$TransactionSynchronization.checkEnlisted(TxConnectionManager.java:742)
            at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.enlist(TxConnectionManager.java:603)
            at org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:367)
            ... 46 more


            • 3. Re: Distributed transaction not rolledBack
              marklittle

              Which JDBC driver did you use for Oracle? (Plus, which version of Oracle?) If possible, please use the 10g driver as it fixes a number of issues with earlier Oracle drivers.

              • 4. Re: Distributed transaction not rolledBack
                trecloux

                It was on Oracle9i, I tested with success on Oracle 10g Express.

                I still have two questions :

                - Is it possible to begin/rollback the EJB transaction from the webapp using the UserTransaction ? My tests on this point are negative and this doc (http://docs.jboss.org/jbossas/admindevel326/html/ch4.chapt.html#d0e8529) seems to confirm it. Do you confirm it ?

                - My compagny is using DB2 databases...what should I do ?

                • 5. Re: Distributed transaction not rolledBack
                  trecloux

                  I was wrong, I have got the same results on Oracle 10g and on DB2.

                  The update of the EJB B is commited, even if a setRollBackOnly is called on the EJB A.

                  Which informations should I provide for you to help me ?

                  • 6. Re: Distributed transaction not rolledBack
                    marklittle

                     

                    "trecloux" wrote:
                    It was on Oracle9i, I tested with success on Oracle 10g Express.

                    I still have two questions :

                    - Is it possible to begin/rollback the EJB transaction from the webapp using the UserTransaction ? My tests on this point are negative and this doc (http://docs.jboss.org/jbossas/admindevel326/html/ch4.chapt.html#d0e8529) seems to confirm it. Do you confirm it ?


                    As the document says, it's not legal to do so in some circumstances. However, some of the limitations mentioned there are specific to the "in memory" transaction manager and not JBossTS.


                    - My compagny is using DB2 databases...what should I do ?


                    DB2 support is not on the immediate roadmap for JBossTS. If you want to try to add that support yourself and post issues to the developer forum (not this forum), then we can try to provide some assistance.

                    • 7. Re: Distributed transaction not rolledBack
                      marklittle

                       

                      "trecloux" wrote:
                      I was wrong, I have got the same results on Oracle 10g and on DB2.

                      The update of the EJB B is commited, even if a setRollBackOnly is called on the EJB A.

                      Which informations should I provide for you to help me ?


                      It sounds to me like two independent transactions are being created. Are you configuring in the JTS implementation of the JTA from JBossTS or the local JTA implementation? You need the JTS implementation for a start.

                      • 8. Re: Distributed transaction not rolledBack
                        trecloux

                         

                        "mark.little@jboss.com" wrote:

                        Are you configuring in the JTS implementation of the JTA from JBossTS or the local JTA implementation? You need the JTS implementation for a start.


                        I installed the "jbossts-jta-4.2.1GA.zip" package. Should I install the full package ? (jbossts-full-4.2.1GA.zip)

                        In my three servers, I have replaced the "in memory" JTA by the JTS JTA :
                        <mbean code="com.arjuna.ats.jbossatx.jta.TransactionManagerService"
                         name="jboss:service=TransactionManager">
                         <attribute name="TransactionTimeout">300</attribute>
                         </mbean>


                        I also see a lot of "com.arjuna.xxxxxx" logs.

                        Thanks.

                        • 9. Re: Distributed transaction not rolledBack
                          marklittle

                           

                          "trecloux" wrote:
                          "mark.little@jboss.com" wrote:

                          Are you configuring in the JTS implementation of the JTA from JBossTS or the local JTA implementation? You need the JTS implementation for a start.


                          I installed the "jbossts-jta-4.2.1GA.zip" package. Should I install the full package ? (jbossts-full-4.2.1GA.zip)


                          That's not the JTS implementation. That is the local (non-distributed) JTA implementation from JBossTS.


                          In my three servers, I have replaced the "in memory" JTA by the JTS JTA :


                          No you haven't :-)


                          <mbean code="com.arjuna.ats.jbossatx.jta.TransactionManagerService"
                           name="jboss:service=TransactionManager">
                           <attribute name="TransactionTimeout">300</attribute>
                           </mbean>


                          I also see a lot of "com.arjuna.xxxxxx" logs.

                          Thanks.


                          You have installed part of JBossTS, but not the JTS part. If you want to encompass multiple servers in the same transaction (even if they are running on the same machine), you need to install the full JBossTS and follow the instructions for configuring the JTS.

                          • 10. Re: Distributed transaction not rolledBack
                            trecloux

                             

                            "mark.little@jboss.com" wrote:


                            You have installed part of JBossTS, but not the JTS part. If you want to encompass multiple servers in the same transaction (even if they are running on the same machine), you need to install the full JBossTS and follow the instructions for configuring the JTS.


                            That's done and it works :-)

                            Do I have to use an "all" server ?

                            I'll now test with the DB2 DataSources

                            Thanks !


                            • 11. Re: Distributed transaction not rolledBack
                              marklittle

                              Yes, as it says in the installation process, you have to run with the all configuration to get the JTS.

                              • 12. Re: Distributed transaction not rolledBack
                                trecloux

                                I have still got a problem :

                                If the setRollbackOnly method is called by the EJB B, the EJB A tryes to commit the transaction and throws a RollbackException.

                                Any idea ?

                                Here is the log :

                                12:44:21,886 WARN [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.BasicAction_36] - BasicAction.End() - prepare phase of action-id a24
                                3954:746:44d9bbe9:8e failed.
                                12:44:21,886 WARN [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.BasicAction_38] - Action Aborting
                                12:44:21,933 ERROR [LogInterceptor] TransactionRolledbackException in method: public abstract void fr.norsys.applitest.alpha.Alpha.propag2
                                TxFailed() throws java.rmi.RemoteException, causedBy:
                                javax.transaction.RollbackException
                                at com.arjuna.ats.internal.jta.transaction.jts.TransactionImple.commit(TransactionImple.java:264)
                                at org.jboss.ejb.plugins.TxInterceptorCMT.endTransaction(TxInterceptorCMT.java:486)
                                at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:346)
                                at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
                                at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:153)
                                at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
                                at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
                                at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
                                at org.jboss.ejb.Container.invoke(Container.java:873)
                                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 org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                                at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                                at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
                                at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
                                at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
                                at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:805)
                                at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:406)
                                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:534)

                                • 13. Re: Distributed transaction not rolledBack
                                  marklittle

                                  Let me get this straight then, because you've changed the scenario since the first post. Now EJBB, which is called after EJBA, calls setRollbackOnly. Then EJBA tries to commit the entire transaction, which includes the work that EJBB did? Correct?

                                  • 14. Re: Distributed transaction not rolledBack
                                    trecloux

                                     

                                    "mark.little@jboss.com" wrote:
                                    Let me get this straight then, because you've changed the scenario since the first post. Now EJBB, which is called after EJBA, calls setRollbackOnly. Then EJBA tries to commit the entire transaction, which includes the work that EJBB did? Correct?


                                    You are true.

                                    The scenario is :
                                    - webapp calls EJB A method (required mode)
                                    - EJB A updates DB
                                    - EJB A calls EJB B method (required mode)
                                    - EJB B updates DB
                                    - EJB B calls setRollbackOnly
                                    - EJB B returns
                                    - EJB A returns

                                    I have got the same error when the EJB B method is in "requiresNew" mode.

                                    In fact , we wrote a complete set of tests to ensure that our big application can run on Jboss. These are the two last errors (true with DB2 and Oracle)

                                    1 2 Previous Next