/** * This implementation calls {@link DataSourceUtils#doCloseConnection}, checking against a {@link * org.springframework.jdbc.datasource.SmartDataSource}. */ @Override public void closeConnection(Connection con) throws SQLException { try { DataSourceUtils.doCloseConnection(con, this.dataSourceToUse); } catch (SQLException ex) { JDBCExceptionReporter.logExceptions(ex); throw ex; } }
/** * This implementation delegates to the underlying DataSource. * * @see javax.sql.DataSource#getConnection() */ @Override public Connection getConnection() throws SQLException { try { return this.dataSourceToUse.getConnection(); } catch (SQLException ex) { JDBCExceptionReporter.logExceptions(ex); throw ex; } }