Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-4293

Should not throw TransactionRolledbackException when the transaction is rolled back because of setRollbackOnly invocation

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Major
    • None
    • JBossAS-4.0.4.GA, JBossAS-4.0.5.GA
    • EJB2
    • None

    Description

      According to 18.3.9 of EJB 2.1 spec "the container should not throw the java.rmi.RemoteException or javax.ejb.EJBException if the container performs a transaction rollback because the instance has invoked the setRollbackOnly method on its EJBContext object. In this case, the container must rollback the transaction and pass the business method result or the application exception thrown by the business method to the client.". Also 17.6.2.8 says "If the container initiated the transaction immediately before dispatching the business method to the instance (as opposed to the transaction being inherited from the caller), the container must note that the instance has invoked the setRollbackOnly method. When the business method invocation completes, the container must roll back rather than commit the transaction. If the business method has returned normally or with an application exception, the container must pass the method result or the application exception to the client after the container performed the rollback.".

      However, if exception-on-rollback is true, JBoss EJB Container throws the TransactionRolledbackException when the transaction is rolled back because of the setRollbackOnly invocation. This clearly violates the EJB spec requirements mentioned above. It seems that the TxInterceptorCMT.checkTransactionStatus method should not throw the exception when the transaction status is STATUS_MARKED_ROLLBACK.

      Attachments

        Activity

          People

            Unassigned Unassigned
            pisv_jira Vladimir Piskarev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: