接口 TransactionFactory
- 所有已知实现类:
JtaTransactionManager,SimpleTransactionFactory,WebLogicJtaTransactionManager,WebSphereUowTransactionManager
public interface TransactionFactory
Strategy interface for creating JTATransactionobjects based on specified transactional characteristics.The default implementation,
SimpleTransactionFactory, simply wraps a standard JTATransactionManager. This strategy interface allows for more sophisticated implementations that adapt to vendor-specific JTA extensions.- 从以下版本开始:
- 2.5
- 作者:
- Juergen Hoeller
- 另请参阅:
TransactionManager.getTransaction(),SimpleTransactionFactory,JtaTransactionManager
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 TransactioncreateTransaction(String name, int timeout)Create an active Transaction object based on the given name and timeout.booleansupportsResourceAdapterManagedTransactions()Determine whether the underlying transaction manager supports XA transactions managed by a resource adapter (i.e. without explicit XA resource enlistment).
方法详细资料
createTransaction
Transaction createTransaction(String name, int timeout) throws NotSupportedException, SystemException
Create an active Transaction object based on the given name and timeout.- 参数:
name- the transaction name (may benull)timeout- the transaction timeout (may be -1 for the default timeout)- 返回:
- the active Transaction object (never
null) - 抛出:
NotSupportedException- if the transaction manager does not support a transaction of the specified typeSystemException- if the transaction manager failed to create the transaction
supportsResourceAdapterManagedTransactions
boolean supportsResourceAdapterManagedTransactions()
Determine 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.