[jboss-jira] [JBoss JIRA] Updated: (JBAS-4293) Should not throw TransactionRolledbackException when the transaction is rolled back because of setRollbackOnly invocation

Vladimir Piskarev (JIRA) jira-events at lists.jboss.org
Wed Apr 4 01:52:01 EDT 2007


     [ http://jira.jboss.com/jira/browse/JBAS-4293?page=all ]

Vladimir Piskarev updated JBAS-4293:
------------------------------------

    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.

  was:
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 should be 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.


> Should not throw TransactionRolledbackException when the transaction is rolled back because of setRollbackOnly invocation
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: JBAS-4293
>                 URL: http://jira.jboss.com/jira/browse/JBAS-4293
>             Project: JBoss Application Server
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: EJB2
>    Affects Versions: JBossAS-4.0.5.GA, JBossAS-4.0.4.GA
>            Reporter: Vladimir Piskarev
>         Assigned To: Scott M Stark
>
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       




More information about the jboss-jira mailing list