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


Field Summary
protected  boolean isActiveTransaction
           
protected  JdbcManagedConnection mngdConn
           
protected  java.sql.Connection sqlConn
           
 
Constructor Summary
JdbcLocalTransaction(JdbcManagedConnection mngdConn)
           
 
Method Summary
 void begin()
           
protected  void cleanup()
          This method is called by the JdbcConnectionManager when its own cleanup method is called.
 void commit()
           
 void rollback()
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sqlConn

protected java.sql.Connection sqlConn

mngdConn

protected JdbcManagedConnection mngdConn

isActiveTransaction

protected boolean isActiveTransaction
Constructor Detail

JdbcLocalTransaction

public JdbcLocalTransaction(JdbcManagedConnection mngdConn)
Method Detail

begin

public void begin()
           throws javax.resource.ResourceException
Specified by:
begin in interface javax.resource.spi.LocalTransaction

commit

public void commit()
            throws javax.resource.ResourceException
Specified by:
commit in interface javax.resource.spi.LocalTransaction

rollback

public void rollback()
              throws javax.resource.ResourceException
Specified by:
rollback in interface javax.resource.spi.LocalTransaction

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.