Example usage for javax.transaction Synchronization afterCompletion

List of usage examples for javax.transaction Synchronization afterCompletion

Introduction

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

Prototype

public void afterCompletion(int status);

Source Link

Document

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

Usage

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

private void afterTransactionCompletion(int status) {
    begun = false;/* w  w  w  .  ja v  a  2  s.c o  m*/
    if (synchronizations != null) {
        for (Synchronization sync : synchronizations) {
            try {
                sync.afterCompletion(status);
            } catch (Throwable t) {
                log.warn("exception calling user Synchronization", t);
            }
        }
    }
}