[jboss-jira] [JBoss JIRA] Created: (JBAS-3860) XAManagedConnection should implement LocalTransaction to clean up hanging LocalTransaction
Weston Price (JIRA)
jira-events at jboss.com
Wed Nov 15 21:01:41 EST 2006
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-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