org.hibernate.engine.transaction.internal.jdbc
Class JdbcTransactionFactory

java.lang.Object
  extended by org.hibernate.engine.transaction.internal.jdbc.JdbcTransactionFactory
All Implemented Interfaces:
Serializable, TransactionFactory<JdbcTransaction>, Service

public final class JdbcTransactionFactory
extends Object
implements TransactionFactory<JdbcTransaction>

Factory for JdbcTransaction instances.

See Also:
Serialized Form

Constructor Summary
JdbcTransactionFactory()
           
 
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.
 JdbcTransaction createTransaction(TransactionCoordinator transactionCoordinator)
          Construct a transaction instance compatible with this strategy.
 ConnectionReleaseMode getDefaultReleaseMode()
          Get the default connection release mode.
 boolean isJoinableJtaTransaction(TransactionCoordinator transactionCoordinator, JdbcTransaction 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

JdbcTransactionFactory

public JdbcTransactionFactory()
Method Detail

createTransaction

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

Specified by:
createTransaction in interface TransactionFactory<JdbcTransaction>
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<JdbcTransaction>
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<JdbcTransaction>
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<JdbcTransaction>
Returns:
true if the transaction strategy represented by this factory is compatible with registering synchronizations; false otherwise.

isJoinableJtaTransaction

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

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