Search in sources :

Example 16 with ConnectionEvent

use of javax.resource.spi.ConnectionEvent in project wildfly by wildfly.

the class HelloWorldManagedConnection method closeHandle.

/**
     * Close handle
     *
     * @param handle The handle
     */
void closeHandle(HelloWorldConnection handle) {
    ConnectionEvent event = new ConnectionEvent(this, ConnectionEvent.CONNECTION_CLOSED);
    event.setConnectionHandle(handle);
    for (javax.resource.spi.ConnectionEventListener cel : listeners) {
        cel.connectionClosed(event);
    }
}
Also used : ConnectionEventListener(javax.resource.spi.ConnectionEventListener) ConnectionEvent(javax.resource.spi.ConnectionEvent)

Example 17 with ConnectionEvent

use of javax.resource.spi.ConnectionEvent in project wildfly by wildfly.

the class MultipleManagedConnection1 method closeHandle.

/**
     * Close handle
     *
     * @param handle The handle
     */
public void closeHandle(MultipleConnection1 handle) {
    ConnectionEvent event = new ConnectionEvent(this, ConnectionEvent.CONNECTION_CLOSED);
    event.setConnectionHandle(handle);
    for (ConnectionEventListener cel : listeners) {
        cel.connectionClosed(event);
    }
}
Also used : ConnectionEvent(javax.resource.spi.ConnectionEvent) ConnectionEventListener(javax.resource.spi.ConnectionEventListener)

Example 18 with ConnectionEvent

use of javax.resource.spi.ConnectionEvent in project wildfly by wildfly.

the class ConfigPropertyManagedConnection method closeHandle.

/**
     * Close handle
     *
     * @param handle The handle
     */
public void closeHandle(ConfigPropertyConnection handle) {
    ConnectionEvent event = new ConnectionEvent(this, ConnectionEvent.CONNECTION_CLOSED);
    event.setConnectionHandle(handle);
    for (ConnectionEventListener cel : listeners) {
        cel.connectionClosed(event);
    }
}
Also used : ConnectionEvent(javax.resource.spi.ConnectionEvent) ConnectionEventListener(javax.resource.spi.ConnectionEventListener)

Example 19 with ConnectionEvent

use of javax.resource.spi.ConnectionEvent in project wildfly by wildfly.

the class LazyManagedConnection method closeHandle.

void closeHandle(LazyConnection handle) {
    ConnectionEvent event = new ConnectionEvent(this, ConnectionEvent.CONNECTION_CLOSED);
    event.setConnectionHandle(handle);
    for (ConnectionEventListener cel : listeners) {
        cel.connectionClosed(event);
    }
}
Also used : ConnectionEvent(javax.resource.spi.ConnectionEvent) ConnectionEventListener(javax.resource.spi.ConnectionEventListener)

Example 20 with ConnectionEvent

use of javax.resource.spi.ConnectionEvent in project jackrabbit by apache.

the class JCAManagedConnection method sendEvent.

/**
     * Send event.
     */
private void sendEvent(int type, Object handle, Exception cause) {
    ConnectionEvent event = new ConnectionEvent(this, type, cause);
    if (handle != null) {
        event.setConnectionHandle(handle);
    }
    sendEvent(event);
}
Also used : ConnectionEvent(javax.resource.spi.ConnectionEvent)

Aggregations

ConnectionEvent (javax.resource.spi.ConnectionEvent)24 ConnectionEventListener (javax.resource.spi.ConnectionEventListener)21 Test (org.junit.Test)5 BadConnectionEventListener (com.sun.appserv.connectors.internal.spi.BadConnectionEventListener)1 GFConnectionImpl (org.apache.geode.internal.ra.GFConnectionImpl)1