org.hibernate.engine.transaction.internal.jta
Class CMTTransactionFactory

java.lang.Object
  extended by org.hibernate.engine.transaction.internal.jta.CMTTransactionFactory
All Implemented Interfaces:
Serializable, TransactionFactory<CMTTransaction>, Service

public class CMTTransactionFactory
extends Object
implements TransactionFactory<CMTTransaction>

Factory for Container Managed Transaction (CMT) based transaction facades.

See Also:
Serialized Form

Constructor Summary
CMTTransactionFactory()
           
 
Method Summary
 boolean canBeDriver()
          Can the transactions created from this strategy act as the driver? In other words can the user actually manage transactions with this strategy?
 boolean compatibleWithJtaSynchronization()
          Should we attempt to register JTA transaction synchronizations.
 CMTTransaction createTransaction(TransactionCoordinator transactionCoordinator)
          Construct a transaction instance compatible with this strategy.
 ConnectionReleaseMode getDefaultReleaseMode()
          Get the default connection release mode.
 boolean isJoinableJtaTransaction(TransactionCoordinator transactionCoordinator, CMTTransaction transaction)
          Can the underlying transaction represented by the passed Hibernate TransactionImplementor be joined?
 
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

createTransaction

public CMTTransaction createTransaction(TransactionCoordinator transactionCoordinator)
Description copied from interface: TransactionFactory
Construct a transaction instance compatible with this strategy.

Specified by:
createTransaction in interface TransactionFactory<CMTTransaction>
Parameters:
transactionCoordinator - The coordinator for this transaction
Returns:
The appropriate transaction instance.

canBeDriver

public boolean canBeDriver()
Description copied from interface: TransactionFactory
Can the transactions created from this strategy act as the driver? In other words can the user actually manage transactions with this strategy?

Specified by:
canBeDriver in interface TransactionFactory<CMTTransaction>
Returns:
true if the transaction strategy represented by this factory can act as the driver callback; false otherwise.

getDefaultReleaseMode

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

Specified by:
getDefaultReleaseMode in interface TransactionFactory<CMTTransaction>
Returns:
The default release mode associated with this strategy

compatibleWithJtaSynchronization

public boolean compatibleWithJtaSynchronization()
Description copied from interface: TransactionFactory
Should we attempt to register JTA transaction synchronizations.

In other words, is this strategy JTA-based?

Specified by:
compatibleWithJtaSynchronization in interface TransactionFactory<CMTTransaction>
Returns:
true if the transaction strategy represented by this factory is compatible with registering synchronizations; false otherwise.

isJoinableJtaTransaction

public boolean isJoinableJtaTransaction(TransactionCoordinator transactionCoordinator,
                                        CMTTransaction transaction)
Description copied from interface: TransactionFactory
Can the underlying transaction represented by the passed Hibernate TransactionImplementor be joined?

Specified by:
isJoinableJtaTransaction in interface TransactionFactory<CMTTransaction>
Parameters:
transactionCoordinator - The transaction coordinator
transaction - The current Hibernate transaction
Returns:
true is the transaction can be joined; false otherwise.


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