List of usage examples for org.hibernate.engine.jdbc.spi SqlExceptionHelper SqlExceptionHelper
SqlExceptionHelper
From source file:com.sismics.util.jpa.ManagedProviderConnectionHelper.java
License:Open Source License
private void releaseConnection() throws SQLException { if (connection != null) { try {/*from w w w . j a v a 2 s . c o m*/ new SqlExceptionHelper().logAndClearWarnings(connection); } finally { try { serviceRegistry.getService(ConnectionProvider.class).closeConnection(connection); } finally { connection = null; } } } }
From source file:com.sismics.util.jpa.SuppliedConnectionProviderConnectionHelper.java
License:Open Source License
@Override public void release() throws SQLException { // we only release the connection if (connection != null) { new SqlExceptionHelper().logAndClearWarnings(connection); if (toggleAutoCommit) { connection.setAutoCommit(false); }/* ww w.j av a 2s . c o m*/ provider.closeConnection(connection); connection = null; } }