if (this.failoverQueryInfo_ == null) { this.failoverQueryInfo_ = new DSConnectionInfo(); if (SanityManager.TraceClientStatementHA) { SanityManager.DEBUG_PRINT(SanityManager.TRACE_CLIENT_HA,
this.failoverQueryInfo_.clearControlConnection();
dsConnInfo.returnConnection(conn); dsConnInfo.removeConnection(conn); } catch (InterruptedException ie) { throw new SqlException(connection_.agent_.logWriter_,
this.failoverQueryInfo_.clearControlConnection();
if (this.failoverQueryInfo_ == null) { this.failoverQueryInfo_ = new DSConnectionInfo(); if (SanityManager.TraceClientStatementHA) { SanityManager.DEBUG_PRINT(SanityManager.TRACE_CLIENT_HA,
public void resetAndDoFinalize() { try { for (int i = 0; i < internalConnections.length; i++) { NetConnection conn = (NetConnection)internalConnections[i]; if (conn != null) { conn.reset(conn.agent_.logWriter_); conn.gotException_ = false; } } doFinalize(); } catch (Exception ex) { if (this.internalConnections != null) { for (int i = 0; i < this.internalConnections.length; i++) { if (this.internalConnections[i] != null) { try { this.connInfo .removeConnection((NetConnection)this.internalConnections[i]); } catch (InterruptedException e) { // ignore. If the cleanup is not proper then the next sql // execution will get // handlable exception } break; } } } } }
dsConnInfo.returnConnection(conn); dsConnInfo.removeConnection(conn); } catch (InterruptedException ie) { throw new SqlException(connection_.agent_.logWriter_,
public void resetAndDoFinalize() { try { for (int i = 0; i < internalConnections.length; i++) { NetConnection conn = (NetConnection)internalConnections[i]; if (conn != null) { conn.reset(conn.agent_.logWriter_); conn.gotException_ = false; } } doFinalize(); } catch (Exception ex) { if (this.internalConnections != null) { for (int i = 0; i < this.internalConnections.length; i++) { if (this.internalConnections[i] != null) { try { this.connInfo .removeConnection((NetConnection)this.internalConnections[i]); } catch (InterruptedException e) { // ignore. If the cleanup is not proper then the next sql // execution will get // handlable exception } break; } } } } }
private void removeConnection(NetConnection conn) throws SqlException { try { dsConnInfo.removeConnection(conn); if (SanityManager.TraceSingleHop) { SanityManager.DEBUG_PRINT(SanityManager.TRACE_SINGLE_HOP, "SingleHopPreparedStatement::removeConnection for connection: "); } if (this.sqlMode_ == isQuery__) { if (this.shopResultSet != null && this.shopResultSet instanceof SingleHopResultSet) { SingleHopResultSet rs = (SingleHopResultSet)this.shopResultSet; FinalizeSingleHopResultSet finalizer = rs.getFinalizer(); if (finalizer != null) { finalizer.nullConnection(conn); } } } } catch (InterruptedException ie) { throw new SqlException(connection_.agent_.logWriter_, new ClientMessageId(SQLState.JAVA_EXCEPTION), ie.getClass().getName(), ie.getMessage(), ie); } }
private void removeConnection(NetConnection conn) throws SqlException { try { dsConnInfo.removeConnection(conn); if (SanityManager.TraceSingleHop) { SanityManager.DEBUG_PRINT(SanityManager.TRACE_SINGLE_HOP, "SingleHopPreparedStatement::removeConnection for connection: "); } if (this.sqlMode_ == isQuery__) { if (this.shopResultSet != null && this.shopResultSet instanceof SingleHopResultSet) { SingleHopResultSet rs = (SingleHopResultSet)this.shopResultSet; FinalizeSingleHopResultSet finalizer = rs.getFinalizer(); if (finalizer != null) { finalizer.nullConnection(conn); } } } } catch (InterruptedException ie) { throw new SqlException(connection_.agent_.logWriter_, new ClientMessageId(SQLState.JAVA_EXCEPTION), ie.getClass().getName(), ie.getMessage(), ie); } }
@Override protected boolean doFinalize() throws Exception { synchronized (this) { for (int i = 0; i < internalConnections.length; i++) { NetConnection conn = (NetConnection)internalConnections[i]; if (conn != null) { this.connInfo.returnConnection(conn); this.internalConnections[i] = null; } } } return true; }
private void removeAllConnectionsUsedFromPoolNoThrow() { for (NetConnection conn : poolConns) { try { if (conn.gotException_) { dsConnInfo.removeConnection(conn); } } catch (InterruptedException ie) { // ignore } } }
private Connection getConnectionFromBoundedQueue(HostPort hp) throws SQLException, SqlException { String host = hp.host_; String portStr = hp.port_; return this.dsConnInfo.getConnectionForThisServerURLFromBQ( host, portStr, this.connection_); }
private Connection getConnectionFromBoundedQueue(HostPort hp) throws SQLException, SqlException { String host = hp.host_; String portStr = hp.port_; return this.dsConnInfo.getConnectionForThisServerURLFromBQ( host, portStr, this.connection_); }
@Override protected boolean doFinalize() throws Exception { synchronized (this) { for (int i = 0; i < internalConnections.length; i++) { NetConnection conn = (NetConnection)internalConnections[i]; if (conn != null) { this.connInfo.returnConnection(conn); this.internalConnections[i] = null; } } } return true; }
private void removeAllConnectionsUsedFromPoolNoThrow() { for (NetConnection conn : poolConns) { try { if (conn.gotException_) { dsConnInfo.removeConnection(conn); } } catch (InterruptedException ie) { // ignore } } }