this.cfgProperties = cfgProperties;
return connection;
connectionProvider = ConnectionProviderFactory.newConnectionProvider( cfgProperties ); connection = connectionProvider.getConnection(); if ( needsAutoCommit && !connection.getAutoCommit() ) { connection.commit(); connection.setAutoCommit( true ); }
if ( connection != null ) { try { JDBCExceptionReporter.logAndClearWarnings( connection ); connectionProvider.closeConnection( connection ); } finally { connectionProvider.close(); } } connection = null;