Package org.castor.transactionmanager
Class AtomikosTransactionManagerFactory
- java.lang.Object
-
- org.castor.transactionmanager.AtomikosTransactionManagerFactory
-
- All Implemented Interfaces:
TransactionManagerFactory
public final class AtomikosTransactionManagerFactory extends java.lang.Object implements TransactionManagerFactory
Transaction manager factory instance to be used with J2EE containers where the transaction manager used is Atomikos. Implements {link org.castor.jdo.transaction.TransactionManagerFactory}.- Since:
- 1.0
- Version:
- $Revision: 8104 $ $Date: 2006-04-13 10:49:49 -0600 (Thu, 13 Apr 2006) $
- Author:
- Ralf Joachim
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
MANAGER_CLASS_NAME
Name of the Atomikos specific transaction manager class.static java.lang.String
NAME
The name of the factory.
-
Constructor Summary
Constructors Constructor Description AtomikosTransactionManagerFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getName()
Returns the short alias for this factory instance.javax.transaction.TransactionManager
getTransactionManager(java.lang.String managerClassName, java.util.Properties properties)
Constructs a instance of the given manager class name which implements javax.transaction.TransactionManager interface with the given properties.javax.transaction.TransactionManager
getTransactionManager(java.util.Properties properties)
Acquires the appropriate javax.transaction.TransactionManager with the given properties.
-
-
-
Field Detail
-
MANAGER_CLASS_NAME
public static final java.lang.String MANAGER_CLASS_NAME
Name of the Atomikos specific transaction manager class.- See Also:
- Constant Field Values
-
NAME
public static final java.lang.String NAME
The name of the factory.- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
public java.lang.String getName()
Returns the short alias for this factory instance.- Specified by:
getName
in interfaceTransactionManagerFactory
- Returns:
- The short alias name.
-
getTransactionManager
public javax.transaction.TransactionManager getTransactionManager(java.util.Properties properties) throws TransactionManagerAcquireException
Acquires the appropriate javax.transaction.TransactionManager with the given properties.- Specified by:
getTransactionManager
in interfaceTransactionManagerFactory
- Parameters:
properties
- The properties passed to the transaction manager.- Returns:
- The transaction manager.
- Throws:
TransactionManagerAcquireException
- If any failure occured when loading the transaction manager.
-
getTransactionManager
public javax.transaction.TransactionManager getTransactionManager(java.lang.String managerClassName, java.util.Properties properties) throws TransactionManagerAcquireException
Constructs a instance of the given manager class name which implements javax.transaction.TransactionManager interface with the given properties. This method has been introduced to allow testing with mock objects.- Parameters:
managerClassName
- Class name of the transaction manager.properties
- The properties passed to the transaction manager.- Returns:
- The transaction manager.
- Throws:
TransactionManagerAcquireException
- If any failure occured when loading the transaction manager.
-
-