[jboss-jira] [JBoss JIRA] Commented: (JBAS-3873) EJB 2.1 - 17.6.2.8 - setRollbackOnly must throw IllegalStateException when called from EJB with transaction attribute of Supports, NotSupported or Never

Darran Lofthouse (JIRA) jira-events at jboss.com
Fri Jan 26 16:14:57 EST 2007


    [ http://jira.jboss.com/jira/browse/JBAS-3873?page=comments#action_12351752 ] 
            
Darran Lofthouse commented on JBAS-3873:
----------------------------------------

Yes which is why the spec states: -

"The Supports transaction attribute must be used with caution. This is because of the different transactional
semantics provided by the two possible modes of execution. Only the enterprise beans that will
execute correctly in both modes should use the Supports transaction attribute."

The spec does not provide any mechanism for the bean to identify if it can call setRollbackOnly so it has completely prohibited it.

If a bean requires to do something transactional then it should not be using the transaction attribute of 'Supports', 'Supports' just lets an existing transaction pass through the bean without forcing a transaction to exist to call the bean.


> EJB 2.1 - 17.6.2.8 - setRollbackOnly must throw IllegalStateException when called from EJB with transaction attribute of Supports, NotSupported or Never
> --------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: JBAS-3873
>                 URL: http://jira.jboss.com/jira/browse/JBAS-3873
>             Project: JBoss Application Server
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: EJB2
>    Affects Versions: JBossAS-4.0.5.GA
>            Reporter: Darran Lofthouse
>         Assigned To: Dimitris Andreadis
>             Fix For: JBossAS-4.2.0.CR1
>
>
> EJB 2.1 - 17.6.2.8 - setRollbackOnly must throw IllegalStateException when called from EJB with transaction attribute of Supports, NotSupported or Never.
> However for an EJB with a transaction attribute of Supports if it is called with a transaction calls to setRollbackOnly succeed.

-- 
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