/** * Overrides method to provide caching support. */ @Override public void close() throws SQLException { if (!open) return; // Uphold the descriptive contract of Connection interface. open = false; closing = true; // Hand connection (self) back to the pool for reuse. pool.freeConnection(this); closing = false; }