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.engine.transaction.spi
Interface TransactionCoordinator

All Superinterfaces:
  Serializable

All Known Implementing Classes:
  TransactionCoordinatorImpl

    public interface TransactionCoordinator

extends Serializable

Acts as the coordinator between the Hibernate engine and physical transactions.

Method Summary
`void` | `addObserver(TransactionObserver observer)` Adds an observer to the coordinator.
`void` | `afterNonTransactionalQuery(boolean success)` Performs actions needed after execution of a non-transactional query.
`void` | `afterTransaction(TransactionImplementor hibernateTransaction, int status)`
`Connection` | `close()` Close the transaction context, returning any user supplied connection from the underlying JDBC coordinator.
`JdbcCoordinator` | `getJdbcCoordinator()` Retrieves the JDBC coordinator currently operating within this transaction coordinator.
`SynchronizationCallbackCoordinator` | `getSynchronizationCallbackCoordinator()`
`SynchronizationRegistry` | `getSynchronizationRegistry()` Obtain the `Synchronization` registry associated with this coordinator.
`TransactionImplementor` | `getTransaction()` Get the Hibernate transaction facade object currently associated with this coordinator.
`TransactionContext` | `getTransactionContext()` Retrieves the context in which this coordinator operates.
`boolean` | `isSynchronizationRegistered()`
`boolean` | `isTransactionInProgress()` Are we "in" an active and joined transaction
`boolean` | `isTransactionJoinable()` Can we join to the underlying transaction?
`boolean` | `isTransactionJoined()` Is the underlying transaction already joined?
`void` | `pulse()` Attempts to register JTA synchronization if possible and needed.
`void` | `resetJoinStatus()` Reset the transaction's join status.
`void` | `sendAfterTransactionBeginNotifications(TransactionImplementor hibernateTransaction)`
`void` | `sendAfterTransactionCompletionNotifications(TransactionImplementor hibernateTransaction, int status)`
`void` | `sendBeforeTransactionCompletionNotifications(TransactionImplementor hibernateTransaction)`
`void` | `setRollbackOnly()`
`boolean` | `takeOwnership()`

Method Detail

### getTransactionContext

    TransactionContext getTransactionContext()

  Retrieves the context in which this coordinator operates.

  Returns:
    The context of the coordinator

### getJdbcCoordinator

    JdbcCoordinator getJdbcCoordinator()

  Retrieves the JDBC coordinator currently operating within this transaction coordinator.

  Returns:
    The JDBC coordinator.

### getTransaction

    TransactionImplementor getTransaction()

  Get the Hibernate transaction facade object currently associated with this coordinator.

  Returns:
    The current Hibernate transaction.

### getSynchronizationRegistry

    SynchronizationRegistry getSynchronizationRegistry()

  Obtain the `Synchronization` registry associated with this coordinator.

  Returns:
    The registry

### addObserver

    void addObserver(TransactionObserver observer)

  Adds an observer to the coordinator.

  Unlike synchronizations added to the `registry`, observers are not to be cleared on transaction completion.

  Parameters:
    `observer` - The observer to add.

### isTransactionJoinable

    boolean isTransactionJoinable()

  Can we join to the underlying transaction?

  Returns:
    true if the underlying transaction can be joined or is already joined; false otherwise.
  See Also:
    `TransactionFactory.isJoinableJtaTransaction(TransactionCoordinator, TransactionImplementor)`

### isTransactionJoined

    boolean isTransactionJoined()

  Is the underlying transaction already joined?

  Returns:
    true if the underlying transaction is already joined; false otherwise.

### resetJoinStatus

    void resetJoinStatus()

  Reset the transaction's join status.

### isTransactionInProgress

    boolean isTransactionInProgress()

  Are we "in" an active and joined transaction

  Returns:
    true if there is currently a transaction in progress; false otherwise.

### pulse

    void pulse()

  Attempts to register JTA synchronization if possible and needed.

### close

    Connection close()

  Close the transaction context, returning any user supplied connection from the underlying JDBC coordinator.

  Returns:
    The user supplied connection (if one).

### afterNonTransactionalQuery

    void afterNonTransactionalQuery(boolean success)

  Performs actions needed after execution of a non-transactional query.

  Parameters:
    `success` - Was the query successfully performed

### setRollbackOnly

    void setRollbackOnly()

### getSynchronizationCallbackCoordinator

    SynchronizationCallbackCoordinator getSynchronizationCallbackCoordinator()

### isSynchronizationRegistered

    boolean isSynchronizationRegistered()

### takeOwnership

    boolean takeOwnership()

### afterTransaction

    void afterTransaction(TransactionImplementor hibernateTransaction,
                          int status)

### sendAfterTransactionBeginNotifications

    void sendAfterTransactionBeginNotifications(TransactionImplementor hibernateTransaction)

### sendBeforeTransactionCompletionNotifications

    void sendBeforeTransactionCompletionNotifications(TransactionImplementor hibernateTransaction)

### sendAfterTransactionCompletionNotifications

    void sendAfterTransactionCompletionNotifications(TransactionImplementor hibernateTransaction,
                                                     int status)

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-2012 Red Hat, Inc. All Rights Reserved.