public class UserTransactionHelper extends Object
A helper for obtaining a handle to a UserTransaction...
To ensure proper cleanup of the InitalContext used to create/lookup the UserTransaction, be sure to always call returnUserTransaction() when you are done with the UserTransaction.
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_USER_TX_LOCATION |
Modifier and Type | Method and Description |
---|---|
static String |
getUserTxLocation() |
static UserTransaction |
lookupUserTransaction()
Create/Lookup a UserTransaction in the InitialContext via the
name set in setUserTxLocation().
|
static void |
returnUserTransaction(UserTransaction userTransaction)
Return a UserTransaction that was retrieved via getUserTransaction().
|
static void |
setUserTxLocation(String userTxURL)
Set the JNDI URL at which the Application Server's UserTransaction can
be found.
|
public static final String DEFAULT_USER_TX_LOCATION
public static String getUserTxLocation()
public static void setUserTxLocation(String userTxURL)
public static UserTransaction lookupUserTransaction() throws SchedulerException
SchedulerException
public static void returnUserTransaction(UserTransaction userTransaction)
Copyright 2001-2019, Terracotta, Inc.