163164165166167168169170171
sessionFactory = annotationConfiguration.buildSessionFactory(); } session = sessionFactory.openSession(); if ( session == null ) { throw new DatabaseException( "could not create session" ); } return session; }