/** * INTERNAL: * Disconnect the accessor only (this must be the write connection as the read is shared). */ public void disconnect(Accessor accessor) throws DatabaseException { accessor.disconnect(this); }
/** * INTERNAL: * Disconnect the accessor only (this must be the write connection as the read is shared). */ public void disconnect(Accessor accessor) throws DatabaseException { accessor.disconnect(this); }
public void onDisconnect() { if (isConnected()) { accessor.disconnect(ownerSession); } }
public void onDisconnect() { if (isConnected()) { accessor.disconnect(ownerSession); } }
public void onDisconnect() { if (isConnected()) { accessor.disconnect(ownerSession); } }
/** * INTERNAL: * Disconnect the accessor only (this must be the write connection as the read is shared). */ public void disconnect() throws DatabaseException { getWriteConnection().disconnect(this); }
/** * INTERNAL: * Disconnect all connections. */ public synchronized void shutDown() { setIsConnected(false); for (Iterator iterator = getConnectionsAvailable().iterator(); iterator.hasNext();) { try { ((Accessor)iterator.next()).disconnect(getOwner()); } catch (DatabaseException exception) { // Ignore. } } for (Iterator iterator = getConnectionsUsed().iterator(); iterator.hasNext();) { try { ((Accessor)iterator.next()).disconnect(getOwner()); } catch (DatabaseException exception) { // Ignore. } } resetConnections(); }
/** * INTERNAL: * Disconnect all connections. */ public synchronized void shutDown() { setIsConnected(false); for (Iterator iterator = getConnectionsAvailable().iterator(); iterator.hasNext();) { try { ((Accessor)iterator.next()).disconnect(getOwner()); } catch (DatabaseException exception) { // Ignore. } } for (Iterator iterator = getConnectionsUsed().iterator(); iterator.hasNext();) { try { ((Accessor)iterator.next()).disconnect(getOwner()); } catch (DatabaseException exception) { // Ignore. } } resetConnections(); }
/** * INTERNAL: * Disconnect all connections. */ public synchronized void shutDown() { setIsConnected(false); for (Iterator iterator = getConnectionsAvailable().iterator(); iterator.hasNext();) { try { ((Accessor)iterator.next()).disconnect(getOwner()); } catch (DatabaseException exception) { // Ignore. } } for (Iterator iterator = getConnectionsUsed().iterator(); iterator.hasNext();) { try { ((Accessor)iterator.next()).disconnect(getOwner()); } catch (DatabaseException exception) { // Ignore. } } resetConnections(); }
/** * INTERNAL: * Disconnect the accessor only. */ public void disconnect() throws DatabaseException { getSequencingHome().onDisconnect(); getAccessor().disconnect(this); }
/** * INTERNAL: * Add the connection as single that a new connection is available. */ public synchronized void releaseConnection(Accessor connection) throws DatabaseException { connection.reset(); this.connectionsUsed.remove(connection); if (!connection.isValid()) { this.owner.setCheckConnections(); try { connection.disconnect(this.owner); } catch (DatabaseException ex) { //this is an invalid connection so expect an exception. } } else { if ((this.connectionsUsed.size() + this.connectionsAvailable.size()) < this.minNumberOfConnections) { this.connectionsAvailable.add(connection); } else { connection.disconnect(getOwner()); } } if (this.owner.isInProfile()) { this.owner.updateProfile(this.name, new Integer(this.connectionsUsed.size())); } notify(); }
this.checkConnections = true; try { connection.disconnect(this.owner); } catch (DatabaseException ex) { this.connectionsAvailable.add(connection); } else { connection.disconnect(getOwner());
this.checkConnections = true; try { connection.disconnect(this.owner); } catch (DatabaseException ex) { this.connectionsAvailable.add(connection); } else { connection.disconnect(getOwner());
/** * INTERNAL: * Disconnect the accessor only. */ public void disconnect() throws DatabaseException { getSequencingHome().onDisconnect(); getAccessor().disconnect(this); }
/** * INTERNAL: * Disconnect the accessor only. */ public void disconnect() throws DatabaseException { getSequencingHome().onDisconnect(); getAccessor().disconnect(this); }
/** * INTERNAL: * Because connections are not exclusive nothing is required. */ public synchronized void releaseConnection(Accessor connection) throws DatabaseException { connection.decrementCallCount(); if (!connection.isValid()){ getOwner().setCheckConnections(); this.connectionsAvailable.remove(connection); try{ connection.disconnect(getOwner()); }catch (Exception ex){ //ignore } } } }
/** * INTERNAL: * Because connections are not exclusive nothing is required. */ public synchronized void releaseConnection(Accessor connection) throws DatabaseException { if (this.owner.shouldLog(SessionLog.FINEST, SessionLog.CONNECTION)) { Object[] args = new Object[1]; args[0] = this.name; this.owner.log(SessionLog.FINEST, SessionLog.CONNECTION, "release_connection", args, connection); } connection.decrementCallCount(); if (!connection.isValid()){ this.checkConnections = true; this.connectionsAvailable.remove(connection); try{ connection.disconnect(getOwner()); }catch (Exception ex){ //ignore } } } }
/** * INTERNAL: * Because connections are not exclusive nothing is required. */ public synchronized void releaseConnection(Accessor connection) throws DatabaseException { if (this.owner.shouldLog(SessionLog.FINEST, SessionLog.CONNECTION)) { Object[] args = new Object[1]; args[0] = this.name; this.owner.log(SessionLog.FINEST, SessionLog.CONNECTION, "release_connection", args, connection); } connection.decrementCallCount(); if (!connection.isValid()){ this.checkConnections = true; this.connectionsAvailable.remove(connection); try{ connection.disconnect(getOwner()); }catch (Exception ex){ //ignore } } } }