- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {Connection c =
DataSource dataSource;dataSource.getConnection()
String url;DriverManager.getConnection(url)
IdentityDatabaseUtil.getDBConnection()
- Smart code suggestions by Codota
}
public void managedClose() { log.trace( "automatically closing session" ); close(); }
public void managedClose() { log.trace("automatically closing session"); close(); }
public Connection close() throws HibernateException { log.trace( "closing session" ); if ( factory.getStatistics().isStatisticsEnabled() ) factory.getStatisticsImplementor().closeSession(); try { try { if ( childSessionsByEntityMode != null ) { Iterator childSessions = childSessionsByEntityMode.values().iterator(); while ( childSessions.hasNext() ) { final SessionImpl child = ( SessionImpl ) childSessions.next(); child.close(); } } } catch( Throwable t ) { // just ignore } if ( isRootSession ) { return jdbcContext.getConnectionManager().close(); } else { return null; } } finally { closed = true; cleanup(); } }
while ( childSessions.hasNext() ) { final SessionImpl child = ( SessionImpl ) childSessions.next(); child.close();