Class SimpleTransactionFactory
java.lang.Object
org.springframework.transaction.jta.SimpleTransactionFactory
- All Implemented Interfaces:
- TransactionFactory
Default implementation of the 
TransactionFactory strategy interface,
 simply wrapping a standard JTA TransactionManager.
 Does not support transaction names; simply ignores any specified name.
- Since:
- 2.5
- Author:
- Juergen Hoeller
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionSimpleTransactionFactory(TransactionManager transactionManager) Create a new SimpleTransactionFactory for the given TransactionManager.
- 
Method SummaryModifier and TypeMethodDescriptioncreateTransaction(String name, int timeout) Create an active Transaction object based on the given name and timeout.booleanDetermine whether the underlying transaction manager supports XA transactions managed by a resource adapter (i.e.
- 
Constructor Details- 
SimpleTransactionFactoryCreate a new SimpleTransactionFactory for the given TransactionManager.- Parameters:
- transactionManager- the JTA TransactionManager to wrap
 
 
- 
- 
Method Details- 
createTransactionpublic Transaction createTransaction(@Nullable String name, int timeout) throws NotSupportedException, SystemException Description copied from interface:TransactionFactoryCreate an active Transaction object based on the given name and timeout.- Specified by:
- createTransactionin interface- TransactionFactory
- Parameters:
- name- the transaction name (may be- null)
- timeout- the transaction timeout (may be -1 for the default timeout)
- Returns:
- the active Transaction object (never null)
- Throws:
- NotSupportedException- if the transaction manager does not support a transaction of the specified type
- SystemException- if the transaction manager failed to create the transaction
 
- 
supportsResourceAdapterManagedTransactionspublic boolean supportsResourceAdapterManagedTransactions()Description copied from interface:TransactionFactoryDetermine whether the underlying transaction manager supports XA transactions managed by a resource adapter (i.e. without explicit XA resource enlistment).Typically false. Checked byAbstractMessageEndpointFactoryin order to differentiate between invalid configuration and valid ResourceAdapter-managed transactions.
 
-