public final class

JDBCTransactionFactory

extends Object
implements TransactionFactory
java.lang.Object
   ↳ org.hibernate.transaction.JDBCTransactionFactory

Class Overview

Factory for JDBCTransaction instances.

Summary

Public Constructors
JDBCTransactionFactory()
Public Methods
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?
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.hibernate.transaction.TransactionFactory

Public Constructors

public JDBCTransactionFactory ()

Public Methods

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).

Returns
  • true if callbacks only ever originate from the Hibernate Transaction; false otherwise.

public void configure (Properties props)

Configure from the given properties.

Parameters
props The configuration properties.

public Transaction createTransaction (JDBCContext jdbcContext, TransactionFactory.Context transactionContext)

Begin a transaction and return the associated Transaction instance.

Parameters
jdbcContext The jdbc context to which the transaction belongs
transactionContext The contract regarding the context in which this transaction will operate.
Returns
  • Transaction

public ConnectionReleaseMode getDefaultReleaseMode ()

Get the default connection release mode.

Returns
  • The default release mode associated with this strategy

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.

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.

public boolean isTransactionManagerRequired ()

Do we require access to the JTA TransactionManager for this strategy?

Returns
  • True if this strategy requires access to the JTA TransactionManager; false otherwise.