Top Description Constructors Methods
org.hibernate.transaction

public final Class JDBCTransactionFactory

extends Object
implements TransactionFactory
Class Inheritance
All Implemented Interfaces
org.hibernate.transaction.TransactionFactory
Imports
java.util.Properties, org.hibernate.ConnectionReleaseMode, .HibernateException, .Transaction, org.hibernate.jdbc.JDBCContext

Factory for JDBCTransaction instances.
Author
Anton van Straaten

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
public void
configure(Properties
The configuration properties.
props
)

Implements org.hibernate.transaction.TransactionFactory.configure.

Configure from the given properties.
public Transaction
createTransaction(JDBCContext
The jdbc context to which the transaction belongs
jdbcContext
,
TransactionFactory.Context
The contract regarding the context in which this transaction will operate.
transactionContext
)

Implements org.hibernate.transaction.TransactionFactory.createTransaction.

Begin a transaction and return the associated Transaction instance.
public ConnectionReleaseMode
public boolean
isTransactionInProgress(JDBCContext
The JDBC context
jdbcContext
,
TransactionFactory.Context
The transaction context
transactionContext
,
Transaction
The Hibernate transaction
transaction
)

Implements org.hibernate.transaction.TransactionFactory.isTransactionInProgress.

Determine whether an underlying transaction is in progress.
public boolean
isTransactionManagerRequired()

Implements org.hibernate.transaction.TransactionFactory.isTransactionManagerRequired.

Do we require access to the JTA TransactionManager for this strategy?
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

JDBCTransactionFactoryback to summary
public JDBCTransactionFactory()

Method Detail

areCallbacksLocalToHibernateTransactionsback to summary
public boolean areCallbacksLocalToHibernateTransactions()

Implements org.hibernate.transaction.TransactionFactory.areCallbacksLocalToHibernateTransactions.

Doc from org.hibernate.transaction.TransactionFactory.areCallbacksLocalToHibernateTransactions.

Are all transaction callbacks local to Hibernate Transactions? Or can the callbacks originate from some other source (e.g. a JTA Synchronization).

Returns:boolean

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

configureback to summary
public void configure(Properties props) throws HibernateException

Implements org.hibernate.transaction.TransactionFactory.configure.

Doc from org.hibernate.transaction.TransactionFactory.configure.

Configure from the given properties.

Parameters
props:Properties

The configuration properties.

Exceptions
HibernateException:
Indicates a problem configuring this factory.
createTransactionback to summary
public Transaction createTransaction(JDBCContext jdbcContext, TransactionFactory.Context transactionContext) throws HibernateException

Implements org.hibernate.transaction.TransactionFactory.createTransaction.

Doc from org.hibernate.transaction.TransactionFactory.createTransaction.

Begin a transaction and return the associated Transaction instance.

Parameters
jdbcContext:JDBCContext

The jdbc context to which the transaction belongs

transactionContext:TransactionFactory.Context

The contract regarding the context in which this transaction will operate.

Returns:Transaction

Transaction

Exceptions
HibernateException:
Indicates a problem generating a transaction instance
getDefaultReleaseModeback to summary
public ConnectionReleaseMode getDefaultReleaseMode()

Implements org.hibernate.transaction.TransactionFactory.getDefaultReleaseMode.

Doc from org.hibernate.transaction.TransactionFactory.getDefaultReleaseMode.

Get the default connection release mode.

Returns:ConnectionReleaseMode

The default release mode associated with this strategy

isTransactionInProgressback to summary
public boolean isTransactionInProgress(JDBCContext jdbcContext, TransactionFactory.Context transactionContext, Transaction transaction)

Implements org.hibernate.transaction.TransactionFactory.isTransactionInProgress.

Doc from org.hibernate.transaction.TransactionFactory.isTransactionInProgress.

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:JDBCContext

The JDBC context

transactionContext:TransactionFactory.Context

The transaction context

transaction:Transaction

The Hibernate transaction

Returns:boolean

true if an underlying transaction is know to be in effect.

isTransactionManagerRequiredback to summary
public boolean isTransactionManagerRequired()

Implements org.hibernate.transaction.TransactionFactory.isTransactionManagerRequired.

Doc from org.hibernate.transaction.TransactionFactory.isTransactionManagerRequired.

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

Returns:boolean

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