/** * @param con * * @throws SQLException */ public synchronized void releaseConnectionOnError( Connection con )throws SQLException { // find the PooledConnection Object for ( int x = 0; x < m_pool.size(); x++ ) { PooledConnection pcon = (PooledConnection) m_pool.elementAt(x); // Check for correct Connection if ( pcon.getConnection() == con ) { if (DEBUG) { System.out.println("Releasing Connection On Error" + x); } con.close(); m_pool.removeElementAt(x); if (DEBUG) { System.out.println("-->Inactive Pool, Closing connection"); } break; } } }
if ( pcon.getConnection() == con )
return pcon.getConnection(); return pcon.getConnection();
/** * @param con * * @throws SQLException */ public synchronized void releaseConnectionOnError( Connection con )throws SQLException { // find the PooledConnection Object for ( int x = 0; x < m_pool.size(); x++ ) { PooledConnection pcon = (PooledConnection) m_pool.elementAt(x); // Check for correct Connection if ( pcon.getConnection() == con ) { if (DEBUG) { System.out.println("Releasing Connection On Error" + x); } con.close(); m_pool.removeElementAt(x); if (DEBUG) { System.out.println("-->Inactive Pool, Closing connection"); } break; } } }
/** * @param con * * @throws SQLException */ public synchronized void releaseConnectionOnError( Connection con )throws SQLException { // find the PooledConnection Object for ( int x = 0; x < m_pool.size(); x++ ) { PooledConnection pcon = (PooledConnection) m_pool.elementAt(x); // Check for correct Connection if ( pcon.getConnection() == con ) { if (DEBUG) { System.out.println("Releasing Connection On Error" + x); } con.close(); m_pool.removeElementAt(x); if (DEBUG) { System.out.println("-->Inactive Pool, Closing connection"); } break; } } }
/** * @param con * * @throws SQLException */ public synchronized void releaseConnectionOnError( Connection con )throws SQLException { // find the PooledConnection Object for ( int x = 0; x < m_pool.size(); x++ ) { PooledConnection pcon = (PooledConnection) m_pool.elementAt(x); // Check for correct Connection if ( pcon.getConnection() == con ) { if (DEBUG) { System.out.println("Releasing Connection On Error" + x); } con.close(); m_pool.removeElementAt(x); if (DEBUG) { System.out.println("-->Inactive Pool, Closing connection"); } break; } } }
if ( pcon.getConnection() == con )
if ( pcon.getConnection() == con )
if ( pcon.getConnection() == con )
return pcon.getConnection(); return pcon.getConnection();
return pcon.getConnection(); return pcon.getConnection();
return pcon.getConnection(); return pcon.getConnection();