[
http://jira.jboss.com/jira/browse/JBAS-4293?page=all ]
Adrian Brock closed JBAS-4293.
------------------------------
Resolution: Rejected
Assignee: (was: Scott M Stark)
exception-on-rollback is false by default and therefore cannot violate the spec.
The feature was developed (as a workaround) for people that have broken ejbs
that should be throwing an exception when they mark the transaction
for rollback, but dont. Meaning the caller didn't know the transaction had failed.
If you don't like the feature don't enable it.
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
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