Example usage for javax.resource.spi ConnectionEvent ConnectionEvent

List of usage examples for javax.resource.spi ConnectionEvent ConnectionEvent

Introduction

In this page you can find the example usage for javax.resource.spi ConnectionEvent ConnectionEvent.

Prototype

public ConnectionEvent(ManagedConnection source, int eid, Exception exception) 

Source Link

Document

Construct a ConnectionEvent object.

Usage

From source file:org.eclipse.ecr.core.storage.sql.ra.ManagedConnectionImpl.java

private void sendEvent(int type, ConnectionImpl connection, Exception cause) {
    ConnectionEvent event = new ConnectionEvent(this, type, cause);
    if (connection != null) {
        event.setConnectionHandle(connection);
    }//  w  w w. ja  v a 2  s  .c  o  m
    sendEvent(event);
}

From source file:org.nuxeo.ecm.core.jca.JCAManagedConnection.java

/**
 * Send event./*from  w  ww  . j a va  2  s  . c om*/
 */
private void sendEvent(int type, Object handle, Exception cause) {
    ConnectionEvent event = new ConnectionEvent(this, type, cause);
    if (handle != null) {
        event.setConnectionHandle(handle);
    }

    sendEvent(event);
}