Example usage for javax.sql XAConnection addConnectionEventListener

List of usage examples for javax.sql XAConnection addConnectionEventListener

Introduction

In this page you can find the example usage for javax.sql XAConnection addConnectionEventListener.

Prototype

void addConnectionEventListener(ConnectionEventListener listener);

Source Link

Document

Registers the given event listener so that it will be notified when an event occurs on this PooledConnection object.

Usage

From source file:org.enhydra.jdbc.pool.StandardXAPoolDataSource.java

public GenerationObject create(String _user, String _password) throws SQLException {
    GenerationObject genObject;//from ww w  .ja  v a2s .  co m
    XAConnection xaCon = xads.getXAConnection(_user, _password);
    // get the xa connection
    xaCon.addConnectionEventListener(this); // add it to the event listener
    log.debug("StandardXAPoolDataSource:create create a object for the pool");
    genObject = new GenerationObject(xaCon, pool.getGeneration(), _user, _password);

    return genObject;
}