public void close() throws SQLException { Throwable firstException = null; if (closed) { return; } try { // close any statements that were created on this connection try { closeStatements(); } catch (SQLException se) { firstException = se; } finally { this.serverConn.close(); if (firstException != null) throw (SQLException) firstException; } } catch (SQLException se) { throw TeiidSQLException.create( se, JDBCPlugin.Util.getString( "MMConnection.Err_connection_close", se.getMessage())); // $NON-NLS-1$ } finally { logger.fine( JDBCPlugin.Util.getString("MMConnection.Connection_close_success")); // $NON-NLS-1$ // set the status of the connection to closed closed = true; } }