public class JNDIAutomaticFactory extends Object implements TransactionFactoryInterface
Due to the nature of the original JNDITransactionFactory, a lot of this code is cut and paste from there, and is essentially a copy.
| Modifier and Type | Field and Description |
|---|---|
protected static String |
AUTO_CONFIGURE_JNDI_PREFIX
Value found in configuration file as a prefix in the JNDI-NAME field if we are to
guess the prefix of the JNDI-NAME
|
protected static String |
AUTO_CONFIGURE_TRANS_MGR
Value found in configuration file in the jndi-name field if we are to
guess the the jndi-name of the (user-)transaction manager
|
protected static JNDIConnectionDetails |
conDetails |
protected static Properties |
CONFIGURATION |
protected static Map<String,Object> |
dsCache |
protected static String[] |
JNDI_PREFIX_GUESSES
A list of guesses that are to be used as prefixes for the JNDI-NAME field if the
user asked us to auto-magically configure it for them.
|
protected static String |
LIST_DELIMITER |
static String |
module |
protected static Map<String,ConnectionTracker> |
trackerCache |
protected static String[] |
TRANSMGR_NAME_GUESS
A list of guesses for the jndi-name of the transaction manager.
|
protected static String[] |
USR_TRANSMGR_NAME_GUESS
A list of guesses for the jndi-name of the user transaction manager.
|
| Constructor and Description |
|---|
JNDIAutomaticFactory() |
| Modifier and Type | Method and Description |
|---|---|
Connection |
getConnection(String helperName) |
TransactionManager |
getTransactionManager() |
String |
getTxMgrName() |
UserTransaction |
getUserTransaction() |
void |
removeDatasource(String helperName)
Removes a datasource, and if necessary, shuts it down
|
public static final String module
protected static Map<String,ConnectionTracker> trackerCache
protected static final Properties CONFIGURATION
protected static final String AUTO_CONFIGURE_TRANS_MGR
protected static final String[] TRANSMGR_NAME_GUESS
protected static final String[] USR_TRANSMGR_NAME_GUESS
protected static final String AUTO_CONFIGURE_JNDI_PREFIX
protected static final String[] JNDI_PREFIX_GUESSES
protected static JNDIConnectionDetails conDetails
protected static final String LIST_DELIMITER
public TransactionManager getTransactionManager()
getTransactionManager in interface TransactionFactoryInterfacepublic UserTransaction getUserTransaction()
getUserTransaction in interface TransactionFactoryInterfacepublic String getTxMgrName()
getTxMgrName in interface TransactionFactoryInterfacepublic Connection getConnection(String helperName) throws SQLException, GenericEntityException
getConnection in interface TransactionFactoryInterfaceSQLExceptionGenericEntityExceptionpublic void removeDatasource(String helperName)
TransactionFactoryInterfaceremoveDatasource in interface TransactionFactoryInterfacehelperName - The name of the datasource to removeCopyright © 2018 Atlassian. All rights reserved.