站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Hibernate 3.2.4 正式版 API 英文文档

CMTTransactionFactory (Hibernate API Documentation) - Hibernate 3.2.4 正式版 API 英文文档


org.hibernate.transaction
Class CMTTransactionFactory

java.lang.Object
  extended byorg.hibernate.transaction.CMTTransactionFactory
All Implemented Interfaces:
TransactionFactory

public class CMTTransactionFactory
extends Object
implements TransactionFactory

Factory for CMTTransaction.

Author:
Gavin King
See Also:
CMTTransaction

Nested Class Summary
 
Nested classes inherited from class org.hibernate.transaction.TransactionFactory
TransactionFactory.Context
 
Constructor Summary
CMTTransactionFactory()
           
 
Method Summary
 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 transactionContext)
          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?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CMTTransactionFactory

public CMTTransactionFactory()
Method Detail

getDefaultReleaseMode

public ConnectionReleaseMode getDefaultReleaseMode()
Description copied from interface: TransactionFactory
Get the default connection release mode

Specified by:
getDefaultReleaseMode in interface TransactionFactory

configure

public void configure(Properties props)
               throws HibernateException
Description copied from interface: TransactionFactory
Configure from the given properties.

Specified by:
configure in interface TransactionFactory
Parameters:
props -
Throws:
HibernateException

createTransaction

public Transaction createTransaction(JDBCContext jdbcContext,
                                     TransactionFactory.Context transactionContext)
                              throws HibernateException
Description copied from interface: TransactionFactory
Begin a transaction and return the associated Transaction instance.

Specified by:
createTransaction in interface TransactionFactory
Parameters:
jdbcContext - The jdbc context to which the transaction belongs
transactionContext - The contract regarding the context in which this transaction will operate.
Returns:
Transaction
Throws:
HibernateException

isTransactionManagerRequired

public boolean isTransactionManagerRequired()
Description copied from interface: TransactionFactory
Do we require access to the JTA TransactionManager for this strategy?

Specified by:
isTransactionManagerRequired in interface TransactionFactory

areCallbacksLocalToHibernateTransactions

public boolean areCallbacksLocalToHibernateTransactions()
Description copied from interface: TransactionFactory
Are all transaction callbacks local to Hibernate Transactions? Or can the callbacks originate from some other source (e.g. a JTA Synchronization).

Specified by:
areCallbacksLocalToHibernateTransactions in interface TransactionFactory
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: TransactionFactory
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.

Specified by:
isTransactionInProgress in interface TransactionFactory
Parameters:
jdbcContext -
transactionContext -
transaction -
Returns:
true if an underlying transaction is know to be in effect.