buildSessionFactory() should return a sessionFactory

Description

In documentation/src/main/docbook/manual/en-US/content/tutorial.xml

This method is supposed to return a SessionFactory:

1 2 3 4 5 6 7 8 9 10 11 12 private static SessionFactory buildSessionFactory() { try { // Create the SessionFactory from hibernate.cfg.xml new Configuration().configure().buildSessionFactory( new StandardServiceRegistryBuilder().build() ); } catch (Throwable ex) { // Make sure you log the exception, as it might be swallowed System.err.println("Initial SessionFactory creation failed." + ex); throw new ExceptionInInitializerError(ex); } }

Environment

None

Status

Assignee

Sanne Grinovero

Reporter

David Pilato

Fix versions

Labels

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

backportDecision

None

Components

Affects versions

4.3.8

Priority

Major
Configure