Example usage for org.hibernate.event.spi FlushEvent getSession

List of usage examples for org.hibernate.event.spi FlushEvent getSession

Introduction

In this page you can find the example usage for org.hibernate.event.spi FlushEvent getSession.

Prototype

public final EventSource getSession() 

Source Link

Document

Returns the session event source for this event.

Usage

From source file:org.granite.tide.hibernate4.HibernateFlushListener.java

License:Open Source License

@Override
public void onFlush(FlushEvent event) throws HibernateException {
    try {//from ww w  . j a v a2 s.c  o m
        super.onFlush(event);
    } catch (StaleObjectStateException e) {
        HibernateOptimisticLockException.rethrowOptimisticLockException(event.getSession(), e);
    }
}