com.rhi.architecture.xa
Class DatabaseTransactionImpl

java.lang.Object
  extended bycom.rhi.architecture.xa.DatabaseTransactionImpl
All Implemented Interfaces:
DatabaseTransaction, Transaction

public class DatabaseTransactionImpl
extends java.lang.Object
implements DatabaseTransaction

Interface for managing database transactions. This is not intended to be a distributed transaction class. It is just a useful interface to use in single DB transactions.

Since:
1.0
Author:
Pete McKinstry

Field Summary
 
Fields inherited from interface com.rhi.architecture.xa.Transaction
TYPE_KEY
 
Constructor Summary
DatabaseTransactionImpl()
          default constructor
 
Method Summary
 void begin()
          Start a new transaction.
 void commit()
          Commit the transaction represented by this object.
 java.sql.Connection getConnection()
          Get the connection associated w/ this DatabaseTransaction
 void rollback()
          Rollback the transaction represented by this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatabaseTransactionImpl

public DatabaseTransactionImpl()
default constructor

Since:
1.0
Method Detail

getConnection

public java.sql.Connection getConnection()
Get the connection associated w/ this DatabaseTransaction

Specified by:
getConnection in interface DatabaseTransaction
Returns:
Connection
Since:
1.0

begin

public void begin()
           throws TransactionException
Start a new transaction.

Specified by:
begin in interface DatabaseTransaction
Throws:
TransactionException
Since:
1.0

commit

public void commit()
            throws TransactionException
Commit the transaction represented by this object.

Specified by:
commit in interface DatabaseTransaction
Throws:
TransactionException
Since:
1.0

rollback

public void rollback()
              throws TransactionException
Rollback the transaction represented by this object.

Specified by:
rollback in interface DatabaseTransaction
Throws:
TransactionException
Since:
1.0


Copyright © 2002-2004 Robert Half International. All Rights Reserved.