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

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

Introduction

In this page you can find the example usage for org.hibernate.event.spi LockEvent 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.HibernateLockListener.java

License:Open Source License

@Override
public void onLock(LockEvent event) throws HibernateException {
    try {//  w  w w . j a  va  2  s .c  o  m
        super.onLock(event);
    } catch (StaleObjectStateException e) {
        HibernateOptimisticLockException.rethrowOptimisticLockException(event.getSession(), e);
    }
}