HibernateUtil.sessionFactory = cfg.buildSessionFactory();
HibernateUtil.configuration = cfg;
} catch ( Exception ex ) {
HibernateUtil.log.error(
Messages.getInstance().getErrorString( "HIBUTIL.ERROR_0007_REBUILD_SESSION_FACTORY" ), ex ); //$NON-NLS-1$
throw new RepositoryException( Messages.getInstance().getErrorString(
"HIBUTIL.ERROR_0007_REBUILD_SESSION_FACTORY" ), ex ); //$NON-NLS-1$
}
}
} else {
try {
cfg.buildSessionFactory();
HibernateUtil.configuration = cfg;
} catch ( Exception ex ) {
HibernateUtil.log.error(
Messages.getInstance().getErrorString( "HIBUTIL.ERROR_0007_REBUILD_SESSION_FACTORY" ), ex ); //$NON-NLS-1$
throw new RepositoryException( Messages.getInstance().getErrorString(
"HIBUTIL.ERROR_0007_REBUILD_SESSION_FACTORY" ), ex ); //$NON-NLS-1$
}
}
}