org.cementj.base.trans
Class JNDITransactionContext
java.lang.Object
org.cementj.support.trans.AbstractTransactionContext
org.cementj.base.trans.JNDITransactionContext
- All Implemented Interfaces:
- TransactionContext
public class JNDITransactionContext
- extends org.cementj.support.trans.AbstractTransactionContext
- implements TransactionContext
JNDI-based TransactionContext for use in J2EE containers without
needing EJB.
The default environment context name is "java:/comp/env".
- Author:
- Derek C. Ashmore
Methods inherited from class org.cementj.support.trans.AbstractTransactionContext |
begin, closeAll, commitAll, getConnection, getRegisteredConnection, registerAllocatedConnection, rollbackAll |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JNDITransactionContext
public JNDITransactionContext()
JNDITransactionContext
public JNDITransactionContext(java.lang.String envContextName)
getNewConnection
public java.sql.Connection getNewConnection(java.lang.String label)
throws TransactionException
- Description copied from interface:
TransactionContext
- Provides a JDBC connection given an identifying label. For applications running
under a J2EE container, this label is typically your database connection pool name.
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.
- Specified by:
getNewConnection
in interface TransactionContext
- Specified by:
getNewConnection
in class org.cementj.support.trans.AbstractTransactionContext
- Returns:
-
- Throws:
TransactionException
getEnvironmentContextName
public java.lang.String getEnvironmentContextName()
- Returns:
setEnvironmentContextName
public void setEnvironmentContextName(java.lang.String string)
- Parameters:
string
-
Copyright © 2003 Delta Vortex Technologies, Inc. All Rights Reserved.