Package org.castor.transactionmanager
Class AtomikosTransactionManagerFactory
java.lang.Object
org.castor.transactionmanager.AtomikosTransactionManagerFactory
- All Implemented Interfaces:
TransactionManagerFactory
public final class AtomikosTransactionManagerFactory
extends 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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetName()
Returns the short alias for this factory instance.getTransactionManager
(String managerClassName, Properties properties) Constructs a instance of the given manager class name which implements javax.transaction.TransactionManager interface with the given properties.getTransactionManager
(Properties properties) Acquires the appropriate javax.transaction.TransactionManager with the given properties.
-
Field Details
-
MANAGER_CLASS_NAME
Name of the Atomikos specific transaction manager class.- See Also:
-
NAME
The name of the factory.- See Also:
-
-
Constructor Details
-
AtomikosTransactionManagerFactory
public AtomikosTransactionManagerFactory()
-
-
Method Details
-
getName
Returns the short alias for this factory instance.- Specified by:
getName
in interfaceTransactionManagerFactory
- Returns:
- The short alias name.
-
getTransactionManager
public TransactionManager getTransactionManager(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 TransactionManager getTransactionManager(String managerClassName, 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.
-