Top Description Fields Constructors Methods
org.hibernate.transaction

public final Class CacheSynchronization

extends Object
implements Synchronization
Class Inheritance
All Implemented Interfaces
javax.transaction.Synchronization
Imports
javax.transaction.Status, .Synchronization, .SystemException, .Transaction, org.slf4j.Logger, .LoggerFactory, org.hibernate.TransactionException, org.hibernate.jdbc.JDBCContext, org.hibernate.util.JTAHelper

A JTA transaction synch used to allow the org.hibernate.Session to know about transaction events.
Author
Gavin King

Field Summary

Modifier and TypeField and Description
private final TransactionFactory.Context
private final Transaction
private JDBCContext
private static final Logger
private final Transaction

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
afterCompletion(int
The status of the transaction completion.
status
)

Implements javax.transaction.Synchronization.afterCompletion.

This method is called by the transaction manager after the transaction is committed or rolled back.
public void
beforeCompletion()

Implements javax.transaction.Synchronization.beforeCompletion.

The beforeCompletion method is called by the transaction manager prior to the start of the two-phase transaction commit process.
private void
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

ctxback to summary
private final TransactionFactory.Context ctx
hibernateTransactionback to summary
private final Transaction hibernateTransaction
jdbcContextback to summary
private JDBCContext jdbcContext
logback to summary
private static final Logger log
transactionback to summary
private final Transaction transaction

Constructor Detail

CacheSynchronizationback to summary
public CacheSynchronization(TransactionFactory.Context ctx, JDBCContext jdbcContext, Transaction transaction, Transaction tx)

Method Detail

afterCompletionback to summary
public void afterCompletion(int status)

Implements javax.transaction.Synchronization.afterCompletion.

Doc from javax.transaction.Synchronization.afterCompletion.

This method is called by the transaction manager after the transaction is committed or rolled back.

Parameters
status:int

The status of the transaction completion.

beforeCompletionback to summary
public void beforeCompletion()

Implements javax.transaction.Synchronization.beforeCompletion.

Doc from javax.transaction.Synchronization.beforeCompletion.

The beforeCompletion method is called by the transaction manager prior to the start of the two-phase transaction commit process. This call is executed with the transaction context of the transaction that is being committed.

setRollbackOnlyback to summary
private void setRollbackOnly()
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.