Class JNDIAutomaticFactory
java.lang.Object
org.ofbiz.core.entity.transaction.JNDIAutomaticFactory
- All Implemented Interfaces:
TransactionFactoryInterface
A TransactionFactory that automatically resolves the transaction factory from JNDI by making
some informed guesses.
Due to the nature of the original JNDITransactionFactory, a lot of this code is cut and paste from there, and is essentially a copy.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final StringValue found in configuration file as a prefix in the JNDI-NAME field if we are to guess the prefix of the JNDI-NAMEprotected static final StringValue found in configuration file in the jndi-name field if we are to guess the the jndi-name of the (user-)transaction managerprotected static JNDIConnectionDetailsprotected static final Propertiesprotected static final String[]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 final Stringstatic final Stringprotected static Map<String,ConnectionTracker> protected static final String[]A list of guesses for the jndi-name of the transaction manager.protected static final String[]A list of guesses for the jndi-name of the user transaction manager. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetConnection(String helperName) javax.transaction.TransactionManagerjavax.transaction.UserTransactionvoidremoveDatasource(String helperName) Removes a datasource, and if necessary, shuts it down
-
Field Details
-
module
-
dsCache
-
trackerCache
-
CONFIGURATION
-
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 -
TRANSMGR_NAME_GUESS
A list of guesses for the jndi-name of the transaction manager. Used if the user asks us to automagically configure this for them. -
USR_TRANSMGR_NAME_GUESS
A list of guesses for the jndi-name of the user transaction manager. Used if the user asks us to automagically configure this for them. -
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 -
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. -
conDetails
-
LIST_DELIMITER
- See Also:
-
-
Constructor Details
-
JNDIAutomaticFactory
public JNDIAutomaticFactory()
-
-
Method Details
-
getTransactionManager
public javax.transaction.TransactionManager getTransactionManager()- Specified by:
getTransactionManagerin interfaceTransactionFactoryInterface
-
getUserTransaction
public javax.transaction.UserTransaction getUserTransaction()- Specified by:
getUserTransactionin interfaceTransactionFactoryInterface
-
getTxMgrName
- Specified by:
getTxMgrNamein interfaceTransactionFactoryInterface
-
getConnection
- Specified by:
getConnectionin interfaceTransactionFactoryInterface- Throws:
SQLExceptionGenericEntityException
-
removeDatasource
Description copied from interface:TransactionFactoryInterfaceRemoves a datasource, and if necessary, shuts it down- Specified by:
removeDatasourcein interfaceTransactionFactoryInterface- Parameters:
helperName- The name of the datasource to remove
-