[jboss-jira] [JBoss JIRA] Resolved: (JBAS-3860) XAManagedConnection should implement LocalTransaction to clean up hanging LocalTransaction

Weston Price (JIRA) jira-events at jboss.com
Fri Jan 19 02:55:52 EST 2007


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

Weston Price resolved JBAS-3860.
--------------------------------

    Fix Version/s: JBossAS-5.0.0.Beta2
       Resolution: Done

Implemented LocalTransaction on XAManagedConnection to fix hanging transaction condition. Note, all methods of LocalTransaction interface (begin, commit, rollback) were added for consistency. 

> XAManagedConnection should implement LocalTransaction to clean up hanging LocalTransaction
> ------------------------------------------------------------------------------------------
>
>                 Key: JBAS-3860
>                 URL: http://jira.jboss.com/jira/browse/JBAS-3860
>             Project: JBoss Application Server
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: JCA service
>            Reporter: Weston Price
>         Assigned To: Weston Price
>             Fix For: JBossAS-5.0.0.Beta2, JBossAS-4.2.0.CR1
>
>
> Currently,  XAManagedConnection does not implement the LocalTransaction interface. As a result the following conditions produces an error:
> @TransactionDemarcation(NotSupported)
> public void doSomething()
> {
>    DataSource ds = ... (XADataSource)
>    Connection c = ds.getConnection();
>    c.setAutoCommit(false); // NOT Managed transaction
>    // do stuff
>    throw EJBException("Container/JCA should rollback uncommitted
> transaction!");
> }
> Because of the c.setAutoCommit(false), a LocalTransaction is started. When the EJBException is thrown, the transaction is left hanging. Typically this is handled in the TxConnectionEventListener for LocalManagedConnection. However, in the case of XAManagedConnection the get mc.getLocalTransaction() throws a ResourceException and the transaction is never rolled back. 

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