Is the buildSessionFactory() Configuration method deprecated in Hibernate?

When I updated the Hibernate version from 3.6.8 to 4.0.0, I got a warning about deprecated method buildSessionFactory() in this line:

private static final SessionFactory sessionFactory =
         new Configuration().configure().buildSessionFactory();

the Javadoc recommends using another method

buildSessionFactory(ServiceRegistry serviceRegistry)

but in the documentation I found deprecated variant

18 Answers
18

Leave a Comment