void closeHandle(JcaExecutorServiceConnection handle) { ConnectionEvent event = new ConnectionEvent(this, ConnectionEvent.CONNECTION_CLOSED); event.setConnectionHandle(handle); for (ConnectionEventListener cel : listeners) { cel.connectionClosed(event); } } public PrintWriter getLogWriter() throws ResourceException {
private Object handleCloseMethod(Object proxy, Method method, Object[] args) { handles.remove(proxy); associatedHandle = null; ConnectionEvent event = new ConnectionEvent(ManagedConnectionImpl.this, ConnectionEvent.CONNECTION_CLOSED); event.setConnectionHandle(proxy); sendEvent(event); return null; } }
protected void unfilteredConnectionError(Exception e) { ConnectionEvent event = new ConnectionEvent(this, ConnectionEvent.CONNECTION_ERROR_OCCURRED, e); for (int i = listeners.size() - 1; i >= 0; i--) { ConnectionEventListener listener = listeners.get(i); listener.connectionErrorOccurred(event); } }
public void error(Exception ex) { LOG.warning(ex.toString()); sendEvent(new ConnectionEvent(this, ConnectionEvent.CONNECTION_ERROR_OCCURRED, ex)); } }
protected void localTransactionRollback(boolean isSPI) throws ResourceException { if (!isSPI) { ConnectionEvent event = new ConnectionEvent(this, ConnectionEvent.LOCAL_TRANSACTION_ROLLEDBACK); for (int i = 0; i < listeners.size(); i++) { ConnectionEventListener listener = listeners.get(i); listener.localTransactionRolledback(event); } } }
protected void localTransactionCommit(boolean isSPI) throws ResourceException { if (!isSPI) { ConnectionEvent event = new ConnectionEvent(this, ConnectionEvent.LOCAL_TRANSACTION_COMMITTED); for (int i = listeners.size() - 1; i >= 0; i--) { ConnectionEventListener listener = listeners.get(i); listener.localTransactionCommitted(event); } } }
protected void localTransactionStart(boolean isSPI) throws ResourceException { if (!isSPI) { ConnectionEvent event = new ConnectionEvent(this, ConnectionEvent.LOCAL_TRANSACTION_STARTED); for (int i = listeners.size() - 1; i >= 0; i--) { ConnectionEventListener listener = listeners.get(i); listener.localTransactionStarted(event); } } }
/** * When closed, the item is not put into the idle pool. */ void killPool() { if (_listener != null) { ConnectionEvent event; event = new ConnectionEvent(this, ConnectionEvent.CONNECTION_ERROR_OCCURRED); _listener.connectionErrorOccurred(event); } }
public void connectionClosed(U handle) { ConnectionEvent event = new ConnectionEvent(this, ConnectionEvent.CONNECTION_CLOSED); event.setConnectionHandle(handle); //count down in case sending the event results in a handle getting removed. for (int i = listeners.size() - 1; i >= 0; i--) { ConnectionEventListener listener = listeners.get(i); listener.connectionClosed(event); } }
public void close(Object closingHandle) throws ResourceException { LOG.fine("Closing handle: " + closingHandle); ConnectionEvent coEvent = new ConnectionEvent(this, ConnectionEvent.CONNECTION_CLOSED); coEvent.setConnectionHandle(closingHandle); sendEvent(coEvent); }
void connectionClosed(XADiskConnection connection) { connectionHandles.remove(connection); ConnectionEvent connectionEvent = new ConnectionEvent(this, ConnectionEvent.CONNECTION_CLOSED); connectionEvent.setConnectionHandle(connection); raiseConnectionEvent(connectionEvent); }
void removeHandle(AzureSBConnectionImpl handle) { connectionHandles.remove(handle); ConnectionEvent event = new ConnectionEvent(this, ConnectionEvent.CONNECTION_CLOSED); event.setConnectionHandle(handle); for (ConnectionEventListener listener : listeners) { listener.connectionClosed(event); } }
void remove(KafkaConnectionImpl conn) { connectionHandles.remove(conn); ConnectionEvent event = new ConnectionEvent(this, ConnectionEvent.CONNECTION_CLOSED); event.setConnectionHandle(conn); for (ConnectionEventListener listener : listeners) { listener.connectionClosed(event); } }
void removeHandle(AmazonSQSConnection connection) { connectionHandles.remove(connection); ConnectionEvent event = new ConnectionEvent(this, ConnectionEvent.CONNECTION_CLOSED); event.setConnectionHandle(connection); for (ConnectionEventListener listener : listeners) { listener.connectionClosed(event); } }
/** * Close handle * * @param handle The handle */ protected void closeHandle( JcrSessionHandle handle ) { ConnectionEvent event = new ConnectionEvent(this, ConnectionEvent.CONNECTION_CLOSED); event.setConnectionHandle(handle); for (ConnectionEventListener cel : listeners) { cel.connectionClosed(event); } }
void close() { if (_listener != null) { ConnectionEvent evt; evt = new ConnectionEvent(this, ConnectionEvent.CONNECTION_CLOSED); evt.setConnectionHandle(this); _listener.connectionClosed(evt); } }
/** * @param con */ protected void detachConnection(FsConnectionImpl con) { LOG.debug("detachConnection con=" + con); con.setManagedConnection(null); connections.remove(con); final ConnectionEvent event = new ConnectionEvent(this, ConnectionEvent.CONNECTION_CLOSED); event.setConnectionHandle(con); fireConnectionEvent(event); }
private void sendEvent(int type, ConnectionImpl connection, Exception cause) { ConnectionEvent event = new ConnectionEvent(this, type, cause); if (connection != null) { event.setConnectionHandle(connection); } sendEvent(event); }
/** * 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); }
@Override public void errorOccurred(Object source, SQLException ex) { log.trace(ex.getMessage()); if (!FatalGDSErrorHelper.isFatal(ex)) return; ConnectionEvent event = new ConnectionEvent(FBManagedConnection.this, ConnectionEvent.CONNECTION_ERROR_OCCURRED, ex); FBManagedConnection.this.notify(connectionErrorOccurredNotifier, event); }