public void configure ( Properties props ) throws HibernateException { try { this . config = new BoneCPConfig ( props ) ; // old hibernate config String url = props . getProperty ( CONFIG_CONNECTION_URL ) ; String username = props . getProperty ( CONFIG_CONNECTION_USERNAME ) ; String password = props . getProperty ( CONFIG_CONNECTION_PASSWORD ) ; String driver = props . getProperty ( CONFIG_CONNECTION_DRIVER_CLASS ) ; if ( url == null ) { url = props . getProperty ( CONFIG_CONNECTION_URL_ALTERNATE ) ; } if ( username == null ) { username = props . getProperty ( CONFIG_CONNECTION_USERNAME_ALTERNATE ) ; } if ( password == null ) { password = props . getProperty ( CONFIG_CONNECTION_PASSWORD_ALTERNATE ) ; } if ( driver == null ) { driver = props . getProperty ( CONFIG_CONNECTION_DRIVER_CLASS_ALTERNATE ) ; } if ( url != null ) { this . config . setJdbcUrl ( url ) ; } if ( username != null ) { this . config . setUsername ( username ) ; } if ( password != null ) { this . config . setPassword ( password ) ; } // Remember Isolation level this . isolation = ConfigurationHelper . getInteger ( AvailableSettings . ISOLATION , props ) ; this . autocommit = ConfigurationHelper . getBoolean ( AvailableSettings . AUTOCOMMIT , props ) ; logger . debug ( this . config . toString ( ) ) ; if ( driver != null && ! driver . trim ( ) . equals ( "" ) ) { loadClass ( driver ) ; } if ( this . config . getConnectionHookClassName ( ) != null ) { Object hookClass = loadClass ( this . config . getConnectionHookClassName ( ) ) . newInstance ( ) ; this . config . setConnectionHook ( ( ConnectionHook ) hookClass ) ; } // create the connection pool this . pool = createPool ( this . config ) ; } catch ( Exception e ) { throw new HibernateException ( e ) ; } }
Pool configuration .