Code example for Connection

Methods: closeisClosed

0
  public synchronized void release(Connection conn) {
    if (isClosed()) 
      return; 
 
    try { 
      if (!conn.isClosed())
        conn.close();
      else 
        return; 
    } catch (SQLException e) {
      error("Unable to close db connection", e);
    } 
 
    pool.drainPermits();
    pool.release();
  } 
} 
Experience pair programming with AI  Get Codota for Java