/** * Destroys the underline physical connection to EIS. * * @param connectionObject connection Object. */ @Override void destroyPooledConnection(Object connectionObject) { try { ((ManagedConnection) connectionObject) .removeConnectionEventListener((ConnectionEventListener) connEventListner); ((ManagedConnection) connectionObject).destroy(); connectionObject = null; } catch (ResourceException rex) { if (logger.isTraceEnabled()) { logger.trace( "ManagedPoolcacheImpl::destroyPooledConnection:Exception in closing the connection.Ignoring it. The exeption is {}", rex.getMessage(), rex); } } } }
/** * Resource adapters will signal that the connection being closed is bad. * * @param evt ConnectionEvent */ public void badConnectionClosed(ConnectionEvent evt) { ManagedConnection mc = (ManagedConnection) evt.getSource(); mc.removeConnectionEventListener(this); poolMgr.badResourceClosed(resource); }
/** * Resource adapters will signal that the connection being closed is bad. * @param evt ConnectionEvent */ public void badConnectionClosed(ConnectionEvent evt){ ManagedConnection mc = (ManagedConnection) evt.getSource(); mc.removeConnectionEventListener(this); connectionClosed(evt); }
/** * Resource adapters will signal that the connection being closed is bad. * @param evt ConnectionEvent */ public void badConnectionClosed(ConnectionEvent evt){ Object connectionHandle = evt.getConnectionHandle(); ResourceHandle handle = resource; if (associatedHandles.containsKey(connectionHandle)) { handle = (ResourceHandle) associatedHandles.get(connectionHandle); } ManagedConnection mc = (ManagedConnection) evt.getSource(); mc.removeConnectionEventListener(this); poolMgr.badResourceClosed(handle); }
public void release(final ManagedConnection mc) throws ResourceException { mc.removeConnectionEventListener(listener); mc.destroy(); if (logger.isDebugEnabled()) { logger.log("DJCA1004", new Object[] { mc }); } }
/** * Resource adapters will signal that the connection is being aborted. * * @param evt ConnectionEvent */ public void connectionAbortOccurred(ConnectionEvent evt) { resource.setConnectionErrorOccurred(); ManagedConnection mc = (ManagedConnection) evt.getSource(); mc.removeConnectionEventListener(this); poolMgr.resourceAbortOccurred(resource); }
public void connectionErrorOccurred(ConnectionEvent evt) { resource.setConnectionErrorOccurred(); ManagedConnection mc = (ManagedConnection) evt.getSource(); mc.removeConnectionEventListener(this); poolMgr.resourceErrorOccurred( resource ); /* try { mc.destroy(); } catch (Exception ex) { // ignore exception } */ }
public void connectionErrorOccurred(ConnectionEvent evt) { resource.setConnectionErrorOccurred(); ManagedConnection mc = (ManagedConnection) evt.getSource(); mc.removeConnectionEventListener(this); poolMgr.resourceErrorOccurred(resource); /* try { mc.destroy(); } catch (Exception ex) { // ignore exception } */ }
/** * Destroys the underline physical connection to EIS. * * @param connectionObject connection Object. */ @Override void destroyPooledConnection(Object connectionObject) { try { ((ManagedConnection) connectionObject) .removeConnectionEventListener((ConnectionEventListener) connEventListner); ((ManagedConnection) connectionObject).destroy(); connectionObject = null; } catch (ResourceException rex) { if (logger.isTraceEnabled()) { logger.trace("ManagedPoolcacheImpl::destroyPooledConnection:Exception in closing the connection.Ignoring it. The exeption is {}", rex.getMessage(), rex); } } } }
public void connectionErrorOccurred(ConnectionEvent evt) { ManagedConnection mc = (ManagedConnection) evt.getSource(); mc.removeConnectionEventListener(this); poolMgr.putbackResourceToPool(resource, true); /* try { mc.destroy(); } catch (Exception ex) { // ignore exception } */ //GJCINT resource.setConnectionErrorOccurred(); }
/** * Resource adapters will signal that the connection being closed is bad. * * @param evt ConnectionEvent */ public void badConnectionClosed(ConnectionEvent evt) { if (resource.hasConnectionErrorOccurred()) { return; } resource.decrementCount(); if (resource.getShareCount() == 0) { ManagedConnection mc = (ManagedConnection) evt.getSource(); mc.removeConnectionEventListener(this); poolMgr.badResourceClosed(resource); } }
/** * Destroys the underline physical connection to EIS. * * @param connectionObject connection Object. */ @Override void destroyPooledConnection(Object connectionObject) { try { ((ManagedConnection) connectionObject) .removeConnectionEventListener((ConnectionEventListener) connEventListner); ((ManagedConnection) connectionObject).destroy(); connectionObject = null; } catch (ResourceException rex) { LogWriterI18n writer = TransactionUtils.getLogWriterI18n(); if (writer.finerEnabled()) writer .finer( "ManagedPoolcacheImpl::destroyPooledConnection:Exception in closing the connection.Ignoring it. The exeption is " + rex.toString(), rex); } } }
/** * {@inheritDoc} */ public void destroy() { if (getState() == ConnectionState.DESTROYED) { log.tracef("ManagedConnection is already destroyed %s", this); return; } getManagedConnectionPool().connectionListenerDestroyed(this); setState(ConnectionState.DESTROYED); final ManagedConnection mc = getManagedConnection(); try { mc.destroy(); } catch (Throwable t) { if (log.isDebugEnabled()) log.debug("Exception destroying ManagedConnection " + this, t); } mc.removeConnectionEventListener(this); }