|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.framework.jdto.transaction.TransactionContext
This class is associated with the Current Thread whenever a transaction is started.
Constructor Summary | |
TransactionContext()
|
Method Summary | |
void |
commit()
Commits the Transaction if the current Transaction Status is STATUS_MARKED_COMMIT. |
Connection |
getConnection()
Returns the connection that is held by the current Transaction. |
int |
getStatus()
Gets the current Transaction Status. |
int |
getTransactionOwner()
Returns the current Transaction Owner |
void |
releaseConnection()
Releases the Connection that is held by the Current Transaction Context once the transaction is either comitted or rolled back. |
void |
rollback()
RollBack the Transaction if the current Transaction Status is STATUS_MARKED_ROLLBACK. |
void |
setConnection(Connection con)
Sets the connection to the current Transaction context. |
void |
setRollbackOnly()
Sets the current Transaction to STATUS_MARKED_ROLLBACK if any failure occurs. |
void |
setStatus(int statusFlag)
Sets the status of the Current Transaction. |
void |
setTransactionOwner(int transactionOwner)
Sets the Tranasaction Owner. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TransactionContext()
Method Detail |
public int getTransactionOwner()
public void setTransactionOwner(int transactionOwner)
transactionOwner
- public Connection getConnection()
public void setConnection(Connection con)
con
- java.sql.Connection type of object.public void setStatus(int statusFlag)
statusFlag
- status of the Transaction as int.public void releaseConnection()
public void commit() throws SQLException
commit
in interface Transaction
SQLException
public int getStatus()
getStatus
in interface Transaction
public void rollback() throws SQLException
rollback
in interface Transaction
SQLException
public void setRollbackOnly()
setRollbackOnly
in interface Transaction
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |