Save This Page
Home » hibernate-distribution-3.3.1.GA-dist » org.hibernate » transaction » [javadoc | source]
org.hibernate.transaction
public interface: TransactionFactory [javadoc | source]

All Known Implementing Classes:
    CMTTransactionFactory, JTATransactionFactory, JDBCTransactionFactory

Contract for generating Hibernate Transaction instances.

The concrete implementation to be used is specified by the org.hibernate.cfg.Environment#TRANSACTION_STRATEGY configuration setting.

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

Nested Class Summary:
public static interface  TransactionFactory.Context  Callback mechanism; a context is always a {@link org.hibernate.Session} in the Hibernate usage. 
Method from org.hibernate.transaction.TransactionFactory Summary:
areCallbacksLocalToHibernateTransactions,   configure,   createTransaction,   getDefaultReleaseMode,   isTransactionInProgress,   isTransactionManagerRequired
Method from org.hibernate.transaction.TransactionFactory Detail:
 public boolean areCallbacksLocalToHibernateTransactions()
    Are all transaction callbacks local to Hibernate Transactions? Or can the callbacks originate from some other source (e.g. a JTA Synchronization).
 public  void configure(Properties props) throws HibernateException
    Configure from the given properties.
 public Transaction createTransaction(JDBCContext jdbcContext,
    TransactionFactory.Context context) throws HibernateException
    Begin a transaction and return the associated Transaction instance.
 public ConnectionReleaseMode getDefaultReleaseMode()
    Get the default connection release mode.
 public boolean isTransactionInProgress(JDBCContext jdbcContext,
    TransactionFactory.Context transactionContext,
    Transaction transaction)
    Determine 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.

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