use of javax.resource.spi.ConnectionEvent in project Payara by payara.
the class ManagedConnectionImpl method connectionErrorOccurred.
/**
* This method is called by the <code>ConnectionHolder30</code> when it detects a connecion
* related error.
*
* @param e Exception that has occurred during an operation on the physical connection
* @param connHolderObject <code>ConnectionHolder</code> that detected the physical
* connection error
*/
void connectionErrorOccurred(Exception e, ConnectionHolder connHolderObject) {
ConnectionEventListener cel = this.listener;
ConnectionEvent ce = null;
ce = e == null ? new ConnectionEvent(this, ConnectionEvent.CONNECTION_ERROR_OCCURRED) : new ConnectionEvent(this, ConnectionEvent.CONNECTION_ERROR_OCCURRED, e);
if (connHolderObject != null) {
ce.setConnectionHandle(connHolderObject);
}
cel.connectionErrorOccurred(ce);
isUsable = false;
}
use of javax.resource.spi.ConnectionEvent in project tomee by apache.
the class SampleManagedConnection method closeHandle.
void closeHandle(SampleConnection handle) {
ConnectionEvent event = new ConnectionEvent(this, ConnectionEvent.CONNECTION_CLOSED);
event.setConnectionHandle(handle);
for (ConnectionEventListener cel : listeners) {
cel.connectionClosed(event);
}
}
use of javax.resource.spi.ConnectionEvent in project tomee by apache.
the class SampleManagedConnection method closeHandle.
void closeHandle(SampleConnection handle) {
ConnectionEvent event = new ConnectionEvent(this, ConnectionEvent.CONNECTION_CLOSED);
event.setConnectionHandle(handle);
for (ConnectionEventListener cel : listeners) {
cel.connectionClosed(event);
}
}
use of javax.resource.spi.ConnectionEvent in project wildfly by wildfly.
the class AnnoManagedConnection method closeHandle.
/**
* Close handle
*
* @param handle The handle
*/
void closeHandle(AnnoConnection handle) {
ConnectionEvent event = new ConnectionEvent(this, ConnectionEvent.CONNECTION_CLOSED);
event.setConnectionHandle(handle);
for (ConnectionEventListener cel : listeners) {
cel.connectionClosed(event);
}
}
use of javax.resource.spi.ConnectionEvent in project wildfly by wildfly.
the class ValidManagedConnection1 method closeHandle.
/**
* Close handle
*
* @param handle The handle
*/
public void closeHandle(ValidConnection1 handle) {
ConnectionEvent event = new ConnectionEvent(this, ConnectionEvent.CONNECTION_CLOSED);
event.setConnectionHandle(handle);
for (ConnectionEventListener cel : listeners) {
cel.connectionClosed(event);
}
}
Aggregations