|
||||||||||
| 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
TransactionContextA 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 TransactionContextgetNewConnection in class org.cementj.support.trans.AbstractTransactionContextTransactionException
public void commitAll()
throws TransactionException
TransactionContext
commitAll in interface TransactionContextcommitAll in class org.cementj.support.trans.AbstractTransactionContextTransactionException
public void rollbackAll()
throws TransactionException
TransactionContext
rollbackAll in interface TransactionContextrollbackAll in class org.cementj.support.trans.AbstractTransactionContextTransactionException
public void begin()
throws TransactionException
TransactionContext
begin in interface TransactionContextbegin in class org.cementj.support.trans.AbstractTransactionContextTransactionException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||