org.hibernate.ejb.transaction
Class JoinableCMTTransactionFactory

java.lang.Object
  extended by org.hibernate.transaction.CMTTransactionFactory
      extended by org.hibernate.ejb.transaction.JoinableCMTTransactionFactory
All Implemented Interfaces:
TransactionFactory

public class JoinableCMTTransactionFactory
extends CMTTransactionFactory

A transaction is in progress if the underlying JTA tx is in progress and if the Tx is marked as MARKED_FOR_JOINED

Author:
Emmanuel Bernard

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.hibernate.transaction.TransactionFactory
TransactionFactory.Context
 
Constructor Summary
JoinableCMTTransactionFactory()
           
 
Method Summary
 Transaction createTransaction(JDBCContext jdbcContext, TransactionFactory.Context transactionContext)
          Begin a transaction and return the associated Transaction instance.
 boolean isTransactionInProgress(JDBCContext jdbcContext, TransactionFactory.Context transactionContext, Transaction transaction)
          Determine whether an underlying transaction is in progress.
 
Methods inherited from class org.hibernate.transaction.CMTTransactionFactory
areCallbacksLocalToHibernateTransactions, configure, getDefaultReleaseMode, isTransactionManagerRequired
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JoinableCMTTransactionFactory

public JoinableCMTTransactionFactory()
Method Detail

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
Overrides:
createTransaction in class CMTTransactionFactory
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 - Indicates a problem generating a transaction instance

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
Overrides:
isTransactionInProgress in class CMTTransactionFactory
Parameters:
jdbcContext - The JDBC context
transactionContext - The transaction context
transaction - The Hibernate transaction
Returns:
true if an underlying transaction is know to be in effect.


Copyright © 2001-2010 Red Hat, Inc. All Rights Reserved.