|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.cementj.support.trans.AbstractTransactionContext
org.cementj.base.trans.J2EETransactionContext
public class J2EETransactionContext
Implementation of a TransactionContext suitable for applications running inside a J2EE container. This is also usable to locally debug classes typically running in a J2EE container that manage transactions.
Copyright: Delta Vortex Technologies, 2003.
Constructor Summary | |
---|---|
protected |
J2EETransactionContext()
|
|
J2EETransactionContext(javax.ejb.EJBContext sessionContext)
|
Method Summary | |
---|---|
void |
begin()
Demarks the beginning of a transaction. |
void |
commitAll()
Commits your JTA transaction (or all JDBC transactions) in progress. |
java.sql.Connection |
getNewConnection(java.lang.String connectPoolName)
Provides a JDBC connection given an identifying label. |
void |
rollbackAll()
Issues rollbacks for your JTA transaction (or all JDBC transactions) in progress. |
Methods inherited from class org.cementj.support.trans.AbstractTransactionContext |
---|
closeAll, getConnection, getRegisteredConnection, registerAllocatedConnection |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.cementj.base.trans.TransactionContext |
---|
closeAll, getConnection |
Constructor Detail |
---|
protected J2EETransactionContext()
public J2EETransactionContext(javax.ejb.EJBContext sessionContext)
Method Detail |
---|
public java.sql.Connection getNewConnection(java.lang.String connectPoolName) throws TransactionException
TransactionContext
A new connection will be created and returned regardless of other connections previously created by this context.
It is imperitive that you don't issue commits, rollbacks, or close connections received from a TransactionContext. Those tasks should be done via the TransactionContext.
getNewConnection
in interface TransactionContext
getNewConnection
in class org.cementj.support.trans.AbstractTransactionContext
TransactionException
public void commitAll() throws TransactionException
TransactionContext
commitAll
in interface TransactionContext
commitAll
in class org.cementj.support.trans.AbstractTransactionContext
TransactionException
public void rollbackAll() throws TransactionException
TransactionContext
rollbackAll
in interface TransactionContext
rollbackAll
in class org.cementj.support.trans.AbstractTransactionContext
TransactionException
public void begin() throws TransactionException
TransactionContext
begin
in interface TransactionContext
begin
in class org.cementj.support.trans.AbstractTransactionContext
TransactionException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |