Package org.hibernate.transaction
Class CMTTransactionFactory
java.lang.Object
org.hibernate.transaction.CMTTransactionFactory
- All Implemented Interfaces:
TransactionFactory
Factory for
CMTTransaction instances.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.hibernate.transaction.TransactionFactory
TransactionFactory.Context -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanAre all transaction callbacks local to Hibernate Transactions? Or can the callbacks originate from some other source (e.g.voidconfigure(Properties props) Configure from the given properties.createTransaction(JDBCContext jdbcContext, TransactionFactory.Context transactionContext) Begin a transaction and return the associated Transaction instance.Get the default connection release mode.booleanisTransactionInProgress(JDBCContext jdbcContext, TransactionFactory.Context transactionContext, Transaction transaction) Determine whether an underlying transaction is in progress.booleanDo we require access to the JTA TransactionManager for this strategy?
-
Constructor Details
-
CMTTransactionFactory
public CMTTransactionFactory()
-
-
Method Details
-
getDefaultReleaseMode
Description copied from interface:TransactionFactoryGet the default connection release mode.- Specified by:
getDefaultReleaseModein interfaceTransactionFactory- Returns:
- The default release mode associated with this strategy
-
configure
Description copied from interface:TransactionFactoryConfigure from the given properties.- Specified by:
configurein interfaceTransactionFactory- Parameters:
props- The configuration properties.- Throws:
HibernateException- Indicates a problem configuring this factory.
-
createTransaction
public Transaction createTransaction(JDBCContext jdbcContext, TransactionFactory.Context transactionContext) throws HibernateException Description copied from interface:TransactionFactoryBegin a transaction and return the associated Transaction instance.- Specified by:
createTransactionin interfaceTransactionFactory- Parameters:
jdbcContext- The jdbc context to which the transaction belongstransactionContext- The contract regarding the context in which this transaction will operate.- Returns:
- Transaction
- Throws:
HibernateException- Indicates a problem generating a transaction instance
-
isTransactionManagerRequired
public boolean isTransactionManagerRequired()Description copied from interface:TransactionFactoryDo we require access to the JTA TransactionManager for this strategy?- Specified by:
isTransactionManagerRequiredin interfaceTransactionFactory- Returns:
- True if this strategy requires access to the JTA TransactionManager; false otherwise.
-
areCallbacksLocalToHibernateTransactions
public boolean areCallbacksLocalToHibernateTransactions()Description copied from interface:TransactionFactoryAre all transaction callbacks local to Hibernate Transactions? Or can the callbacks originate from some other source (e.g. a JTA Synchronization).- Specified by:
areCallbacksLocalToHibernateTransactionsin interfaceTransactionFactory- Returns:
- true if callbacks only ever originate from the Hibernate
Transaction; false otherwise.
-
isTransactionInProgress
public boolean isTransactionInProgress(JDBCContext jdbcContext, TransactionFactory.Context transactionContext, Transaction transaction) Description copied from interface:TransactionFactoryDetermine whether an underlying transaction is in progress. Mainly this is used in determining whether to register a synchronization as well as whether or not to circumvent auto flushing outside transactions.- Specified by:
isTransactionInProgressin interfaceTransactionFactory- Parameters:
jdbcContext- The JDBC contexttransactionContext- The transaction contexttransaction- The Hibernate transaction- Returns:
- true if an underlying transaction is know to be in effect.
-