org.mentawai.transaction
Class JdbcTransaction

java.lang.Object
  extended by org.mentawai.transaction.JdbcTransaction
All Implemented Interfaces:
Transaction

public class JdbcTransaction
extends Object
implements Transaction


Constructor Summary
JdbcTransaction()
           
JdbcTransaction(Connection conn)
           
 
Method Summary
 void begin()
          Begins the transaction.
 void commit()
          Commits the transaction.
 void end()
           
 Connection getConn()
           
 Connection getConnection()
           
 boolean isActive()
          Is the transaction still active, in other words, is it still not commited and not rolledback ?
 void rollback()
          Rollbacks the transaction.
 void setConn(Connection conn)
           
 void setConnection(Connection conn)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JdbcTransaction

public JdbcTransaction()

JdbcTransaction

public JdbcTransaction(Connection conn)
Method Detail

setConnection

public void setConnection(Connection conn)

setConn

public void setConn(Connection conn)

getConn

public Connection getConn()

getConnection

public Connection getConnection()

begin

public void begin()
           throws Exception
Description copied from interface: Transaction
Begins the transaction.

Specified by:
begin in interface Transaction
Throws:
Exception

commit

public void commit()
            throws Exception
Description copied from interface: Transaction
Commits the transaction.

Specified by:
commit in interface Transaction
Throws:
Exception

rollback

public void rollback()
              throws Exception
Description copied from interface: Transaction
Rollbacks the transaction.

Specified by:
rollback in interface Transaction
Throws:
Exception

isActive

public boolean isActive()
Description copied from interface: Transaction
Is the transaction still active, in other words, is it still not commited and not rolledback ?

Specified by:
isActive in interface Transaction
Returns:
true if the transaction was not commited and was not rolledback

end

public void end()
         throws Exception
Specified by:
end in interface Transaction
Throws:
Exception


Copyright © 2013. All Rights Reserved.