use of javax.resource.spi.ConnectionEventListener 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);
}
}
use of javax.resource.spi.ConnectionEventListener 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);
}
}
use of javax.resource.spi.ConnectionEventListener 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);
}
}
use of javax.resource.spi.ConnectionEventListener in project cxf by apache.
the class ManagedConnectionImplTest method testClose.
@Test
public void testClose() throws Exception {
final Object o = new Object();
ConnectionEventListener listener = EasyMock.createMock(ConnectionEventListener.class);
listener.connectionClosed(EasyMock.isA(ConnectionEvent.class));
EasyMock.expectLastCall();
EasyMock.replay(listener);
mc.addConnectionEventListener(listener);
mc.close(o);
EasyMock.verify(listener);
}
use of javax.resource.spi.ConnectionEventListener in project cxf by apache.
the class ManagedConnectionImplTest method testSendEventError.
@Test
public void testSendEventError() throws Exception {
ConnectionEvent event = new ConnectionEvent(mc, ConnectionEvent.CONNECTION_ERROR_OCCURRED);
ConnectionEventListener listener = EasyMock.createMock(ConnectionEventListener.class);
mc.addConnectionEventListener(listener);
listener.connectionErrorOccurred(EasyMock.isA(ConnectionEvent.class));
EasyMock.expectLastCall();
EasyMock.replay(listener);
mc.sendEvent(event);
EasyMock.verify(listener);
}
Aggregations