Code example for Connection

Methods: closeisClosed

0
 
    /** 
     * @throws SQLException 
     */ 
    public void disconnect() throws SQLException { 
        connection.close();
        log.debug("Disconnected from database");
    } 
 
    protected void finalize() throws Throwable { 
        try { 
            if (!connection.isClosed()) {
                disconnect(); 
            } 
 
        } catch (SQLException e) {
            log.error("Error while disconnecting from database");
            throw new SQLException("Error while disconnecting from database");
        } 
        super.finalize(); 
Connect your IDE to all the code out there  Get Codota for Java