public synchronized boolean releasePooledConnection(PooledConnection conn){
  ConnectionDesc entry;
  int loc=conns.indexOf(entry=new ConnectionDesc(conn));
  d("release(): ",conn);
  if (loc >= 0) {
    if (closed || (prefSize > 0 && conns.size() > prefSize)) {
      d("release(): closing ",conn);
      td("Close ",conn);
      conns.remove(entry);
      conn.closeConnection();
    }
 else {
      d("release(): release ",conn);
      td("Release ",conn);
      entry=conns.get(loc);
      entry.release();
    }
    notifyAll();
    d("release(): notify");
    return true;
  }
 else {
    return false;
  }
}

public synchronized boolean releasePooledConnection ( PooledConnection conn ) { ConnectionDesc entry ; int loc = conns . indexOf ( entry = new ConnectionDesc ( conn ) ) ; d ( "release(): " , conn ) ; if ( loc >= 0 ) { if ( closed || ( prefSize > 0 && conns . size ( ) > prefSize ) ) { d ( "release(): closing " , conn ) ; td ( "Close " , conn ) ; conns . remove ( entry ) ; conn . closeConnection ( ) ; } else { d ( "release(): release " , conn ) ; td ( "Release " , conn ) ; entry = conns . get ( loc ) ; entry . release ( ) ; } notifyAll ( ) ; d ( "release(): notify" ) ; return true ; } else { return false ; } }
releases connection back into list . if the list size is below prefsize , the connection may be reused . if the list size exceeds prefsize , then the connection is closed and removed from the list . public because implemented as part of poolcallback .
