Example usage for javax.transaction Synchronization beforeCompletion

List of usage examples for javax.transaction Synchronization beforeCompletion

Introduction

In this page you can find the example usage for javax.transaction Synchronization beforeCompletion.

Prototype

public void beforeCompletion();

Source Link

Document

The beforeCompletion method is called by the transaction manager prior to the start of the two-phase transaction commit process.

Usage

From source file:org.hibernate.shards.transaction.ShardedTransactionImpl.java

private void beforeTransactionCompletion() {
    if (synchronizations != null) {
        for (Synchronization sync : synchronizations) {
            try {
                sync.beforeCompletion();
            } catch (Throwable t) {
                log.warn("exception calling user Synchronization", t);
            }//from   www. ja v a2s.c o m
        }
    }
}