org.hibernate.transaction
Interface TransactionFactory

All Known Implementing Classes:
CMTTransactionFactory, JDBCTransactionFactory, JTATransactionFactory

public interface TransactionFactory

An abstract factory for Transaction instances. Concrete implementations are specified by hibernate.transaction.factory_class.

Implementors must be threadsafe and should declare a public default constructor.

Author:
Anton van Straaten, Gavin King
See Also:
Transaction

Nested Class Summary
static interface TransactionFactory.Context
           
 
Method Summary
 boolean areCallbacksLocalToHibernateTransactions()
           
 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 isTransactionManagerRequired()
          Do we require access to the JTA TransactionManager for this strategy?
 

Method Detail

createTransaction

public Transaction createTransaction(JDBCContext jdbcContext,
                                     TransactionFactory.Context context)
                              throws HibernateException
Begin a transaction and return the associated Transaction instance.

Parameters:
jdbcContext - The jdbc context to which the transaction belongs
context - The contract regarding the context in which this transaction will operate.
Returns:
Transaction
Throws:
HibernateException

configure

public void configure(Properties props)
               throws HibernateException
Configure from the given properties.

Parameters:
props -
Throws:
HibernateException

getDefaultReleaseMode

public ConnectionReleaseMode getDefaultReleaseMode()
Get the default connection release mode


isTransactionManagerRequired

public boolean isTransactionManagerRequired()
Do we require access to the JTA TransactionManager for this strategy?


areCallbacksLocalToHibernateTransactions

public boolean areCallbacksLocalToHibernateTransactions()