Uploaded image for project: 'JBoss Enterprise Application Platform 6'
  1. JBoss Enterprise Application Platform 6
  2. JBPAPP6-262

javax.transaction.RollbackException may be thrown when commiting a transaction on a EJB that is not paticipating in a transaction

    Details

      Description

      This is a request for a better optimization when dealing with JBoss to JBoss calls on EJBs with a mixture of @TransactionAttribute(TransactionAttributeType.REQUIRED) and @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED) annotations.

      The request refers to the following scenario. A stand alone Java client starts a XA user transaction and calls an EJB_A on server X.

      EJB_A is annotated with the following annotations:

      @TransactionManagement(TransactionManagementType.CONTAINER)
      @TransactionAttribute(TransactionAttributeType.REQUIRED)

      EJB_A in turn calls EJB_B on server Y. EJB_B is annotated with following annotations:

      @TransactionManagement(TransactionManagementType.CONTAINER)
      @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)

      When the call to EJB_B on server Y returns to EJB_A on server X, server Y gets killed.

      Eventually the chain of execution returns to the client, then it attempts to commit the transaction. At that point the commit() method throws javax.transaction.RollbackException: org.omg.CORBA.TRANSACTION_ROLLEDBACK: exception.

      Though from the EJB spec point of view I think there is nothing wrong with our implementation I feel that from the call optimization point of view the above does not make sense.

      I can accept that when the transaction context gets propagated between server X and server Y there is not way of knowing that the EJB_B does not support transactions so some resources may need to be attached to the thread of execution. But by the time the client calls commit() method, the transaction manager should know that the EJB_B is irrelevant at that point to the success or failure of this transaction. For that reason the commit() method should not try to contact Server Y. In the above scenario the commit() method should succeed even though Server Y is dead.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                jiwils Jimmy Wilson
                Reporter:
                raggz Tom Ross
              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: