public interface TransactionFactory
Transaction
instances.
The concrete implementation to be used is specified by the
Environment.TRANSACTION_STRATEGY
configuration
setting.
Implementors must be threadsafe and should declare a public default constructor.Transaction
Modifier and Type | Interface and Description |
---|---|
static interface |
TransactionFactory.Context
Callback mechanism; a context is always a
Session
in the Hibernate usage. |
Modifier and Type | Method and Description |
---|---|
boolean |
areCallbacksLocalToHibernateTransactions()
Are all transaction callbacks local to Hibernate Transactions?
Or can the callbacks originate from some other source (e.g.
|
void |
configure(Properties props)
Configure from the given properties.
|
Transaction |
createTransaction(JDBCContext jdbcContext,
TransactionFactory.Context context)
Begin a transaction and return the associated Transaction instance.
|
ConnectionReleaseMode |
getDefaultReleaseMode()
Get the default connection release mode.
|
boolean |
isTransactionInProgress(JDBCContext jdbcContext,
TransactionFactory.Context transactionContext,
Transaction transaction)
Determine whether an underlying transaction is in progress.
|
boolean |
isTransactionManagerRequired()
Do we require access to the JTA TransactionManager for
this strategy?
|
Transaction createTransaction(JDBCContext jdbcContext, TransactionFactory.Context context) throws HibernateException
jdbcContext
- The jdbc context to which the transaction belongscontext
- The contract regarding the context in which this transaction will operate.HibernateException
- Indicates a problem generating a transaction instancevoid configure(Properties props) throws HibernateException
props
- The configuration properties.HibernateException
- Indicates a problem configuring this factory.ConnectionReleaseMode getDefaultReleaseMode()
boolean isTransactionManagerRequired()
boolean areCallbacksLocalToHibernateTransactions()
Transaction
; false otherwise.boolean isTransactionInProgress(JDBCContext jdbcContext, TransactionFactory.Context transactionContext, Transaction transaction)
jdbcContext
- The JDBC contexttransactionContext
- The transaction contexttransaction
- The Hibernate transactionCopyright © 2002-2017 Red Hat Middleware, LLC. All Rights Reserved