public final class TransactionManagerRegistry extends Object
TransactionManager
instances obtained by their name.Constructor and Description |
---|
TransactionManagerRegistry(AbstractProperties properties)
Construct an instance of TransactionManagerRegistry that uses given
LocalConfiguration to get required configuration properties.
|
Modifier and Type | Method and Description |
---|---|
void |
deregisterTransactionManager(String managerName)
Deregister TransactionManager with given name.
|
TransactionManager |
getTransactionManager(String managerName)
Get the TransactionManager with given name.
|
String[] |
getTransactionManagerNames()
Returns the names of all the registered
TransactionManager 's. |
void |
registerTransactionManager(String managerName,
String factoryName,
Properties properties)
Register TransactionManager with given name.
|
void |
registerTransactionManager(String managerName,
TransactionManager managerInstance)
Register given TransactionManager with given name.
|
public TransactionManagerRegistry(AbstractProperties properties)
properties
- The properties.public void registerTransactionManager(String managerName, String factoryName, Properties properties) throws TransactionManagerAcquireException
managerName
- The name of the TransactionManager to register.factoryName
- The name of the TransactionManagerFactory used to get
the factory from TransactionManagerFactoryRegistry.properties
- The properties passed to the TransactionManager at
initialization.TransactionManagerAcquireException
- If a TransactionManager with the
same name has already been registered or if any failure occured at
initialization of the TransactionManager.public void registerTransactionManager(String managerName, TransactionManager managerInstance) throws TransactionManagerAcquireException
managerName
- The name of the TransactionManager to register.managerInstance
- The TransactionManager instance.TransactionManagerAcquireException
- If a TransactionManager with the
same name has already been registered.public void deregisterTransactionManager(String managerName)
managerName
- The name of the TransactionManager to deregister.public String[] getTransactionManagerNames()
TransactionManager
's.TransactionManager
's.public TransactionManager getTransactionManager(String managerName) throws TransactionManagerAcquireException
managerName
- The name of the TransactionManager to return.TransactionManagerAcquireException
- If a TransactionManager with name
has not been registered or if any failure occured at initialization
of the TransactionManager.Copyright © 2018. All rights reserved.