From 856721507c618d3061b9c035e049f9818969f7ab Mon Sep 17 00:00:00 2001 From: Brett Meyer Date: Tue, 28 Jan 2014 17:19:06 -0500 Subject: [PATCH] HHH-8674 - fixed usage of deprecated method Configuration#buildSessionFactory() in documentation --- .../src/main/docbook/manual/en-US/content/tutorial.xml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/documentation/src/main/docbook/manual/en-US/content/tutorial.xml b/documentation/src/main/docbook/manual/en-US/content/tutorial.xml index e107dc22ea..bb8e571bef 100644 --- a/documentation/src/main/docbook/manual/en-US/content/tutorial.xml +++ b/documentation/src/main/docbook/manual/en-US/content/tutorial.xml @@ -589,9 +589,8 @@ public class HibernateUtil { private static SessionFactory buildSessionFactory() { try { // Create the SessionFactory from hibernate.cfg.xml - Configuration configuration = new Configuration(); - return configuration.configure().buildSessionFactory(new StandardServiceRegistryBuilder() - .applySettings(configuration.getProperties()).build()); + new Configuration().configure().buildSessionFactory( + new StandardServiceRegistryBuilder().build() ); } catch (Throwable ex) { // Make sure you log the exception, as it might be swallowed