Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.hibernate.transaction
Class JDBCTransactionFactory

    java.lang.Object
      org.hibernate.transaction.JDBCTransactionFactory

All Implemented Interfaces:
  TransactionFactory

    public final class JDBCTransactionFactory

extends Object
implements TransactionFactory

Factory for `JDBCTransaction` instances.

Author:
  Anton van Straaten

Nested Class Summary

Nested classes/interfaces inherited from interface org.hibernate.transaction.TransactionFactory
`TransactionFactory.Context`

Constructor Summary
`JDBCTransactionFactory()`

Method Summary
`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?

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

### getDefaultReleaseMode

    public ConnectionReleaseMode getDefaultReleaseMode()

  Get the default connection release mode.

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

### createTransaction

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

  Begin a transaction and return the associated `Transaction` instance.

  Specified by:
    `createTransaction` in interface `TransactionFactory`
  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

### configure

    public void configure(Properties props)
                   throws HibernateException

  Configure from the given properties.

  Specified by:
    `configure` in interface `TransactionFactory`
  Parameters:
    `props` - The configuration properties.
  Throws:
    `HibernateException` - Indicates a problem configuring this factory.

### isTransactionManagerRequired

    public boolean isTransactionManagerRequired()

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

  Specified by:
    `isTransactionManagerRequired` in interface `TransactionFactory`
  Returns:
    True if this strategy requires access to the JTA TransactionManager; false otherwise.

### areCallbacksLocalToHibernateTransactions

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

  Specified by:
    `areCallbacksLocalToHibernateTransactions` in interface `TransactionFactory`
  Returns:
    true if callbacks only ever originate from the Hibernate `Transaction`; false otherwise.

### isTransactionInProgress

    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.

  Specified by:
    `isTransactionInProgress` in interface `TransactionFactory`
  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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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