org.castor.transactionmanager
Class TransactionManagerRegistry
java.lang.Object
org.castor.transactionmanager.TransactionManagerRegistry
public final class TransactionManagerRegistry
extends java.lang.Object
Registry for TransactionManager
instances obtained by their name.
$Revision: 5951 $ $Date: 2006-04-25 15:08:23 -0600 (Tue, 25 Apr 2006) $
TransactionManagerRegistry
public TransactionManagerRegistry(Configuration config)
Construct an instance of TransactionManagerRegistry that uses given
LocalConfiguration to get required configuration properties.
config
- The LocalConfiguration.
deregisterTransactionManager
public void deregisterTransactionManager(String managerName)
Deregister TransactionManager with given name.
managerName
- The name of the TransactionManager to deregister.
getTransactionManager
public TransactionManager getTransactionManager(String managerName)
throws TransactionManagerAcquireException
Get the TransactionManager with given name.
managerName
- The name of the TransactionManager to return.
getTransactionManagerNames
public String[] getTransactionManagerNames()
Returns the names of all the registered TransactionManager
's.
- Names of
TransactionManager
's.
registerTransactionManager
public void registerTransactionManager(String managerName,
String factoryName,
Properties properties)
throws TransactionManagerAcquireException
Register TransactionManager with given name. The method requires the name
of the TransactionManagerFactory and properties to initialize the manager
to be passed as parameters. Depending on the value of configuration property
org.castor.jdo.TransactionManagerInitializeAtRegistration the
manager will be initialized at registration or lazily when requested.
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.
registerTransactionManager
public void registerTransactionManager(String managerName,
TransactionManager managerInstance)
throws TransactionManagerAcquireException
Register given TransactionManager with given name.
managerName
- The name of the TransactionManager to register.managerInstance
- The TransactionManager instance.
Intalio Inc. (C) 1999-2006. All rights reserved http://www.intalio.com