org.openejb.resource.jdbc
Class JdbcLocalTransaction
java.lang.Object
org.openejb.resource.jdbc.JdbcLocalTransaction
- All Implemented Interfaces:
- javax.resource.spi.LocalTransaction
public class JdbcLocalTransaction
- extends java.lang.Object
- implements javax.resource.spi.LocalTransaction
Method Summary |
void |
begin()
|
protected void |
cleanup()
This method is called by the JdbcConnectionManager when its own cleanup method is called. |
void |
commit()
|
protected java.lang.String |
formatSqlException(java.sql.SQLException e)
|
void |
rollback()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
sqlConn
protected java.sql.Connection sqlConn
managedConn
protected JdbcManagedConnection managedConn
isActiveTransaction
protected boolean isActiveTransaction
messages
protected static final Messages messages
logger
protected static final Logger logger
JdbcLocalTransaction
public JdbcLocalTransaction(JdbcManagedConnection managedConn)
begin
public void begin()
throws javax.resource.ResourceException
- Specified by:
begin
in interface javax.resource.spi.LocalTransaction
- Throws:
javax.resource.ResourceException
commit
public void commit()
throws javax.resource.ResourceException
- Specified by:
commit
in interface javax.resource.spi.LocalTransaction
- Throws:
javax.resource.ResourceException
rollback
public void rollback()
throws javax.resource.ResourceException
- Specified by:
rollback
in interface javax.resource.spi.LocalTransaction
- Throws:
javax.resource.ResourceException
cleanup
protected void cleanup()
throws javax.resource.ResourceException
- This method is called by the JdbcConnectionManager when its own cleanup method is called.
It ensures that the JdbcLocalTransaction has been properly committed or rolled back. If the
transaction is still active, it's rolled back.
- Throws:
javax.resource.ResourceException
formatSqlException
protected java.lang.String formatSqlException(java.sql.SQLException e)
Copyright © 1999-2011 OpenEJB. All Rights Reserved.