void closeAndDetachTransactionConnection() throws FeatureStoreException { try { transaction.get().getConnection().close(); } catch ( final SQLException e ) { LOG.error( "Error closing connection/removing it from the pool: " + e.getMessage() ); } finally { transaction.remove(); } }
protected Connection getConnection() throws SQLException { if ( isTransactionActive() ) { return transaction.get().getConnection(); } final Connection conn = connProvider.getConnection(); conn.setAutoCommit( readAutoCommit ); return conn; }