6566676869707172737475
_factory = _cfg.buildSessionFactory(); // build tables if necessary if (! allTablesExist()) new SchemaUpdate(_cfg).execute(false, true); } catch (MappingException me) { _log.error("Could not initialise database connection.", me); } }
592593594595596597598599600601602
} catch (Exception e) { if (tx != null) { tx.rollback(); } Logger.getLogger(loggerName).warn("Database does not appear to exist - Attempting to create new database ..."); new SchemaUpdate(cfg).execute(false, true); HumanResourceRole.addIntegrityEnforcements(session); } finally { session.close(); }