Create session factory in Hibernate 4
Yes, they have deprecated the previous buildSessionFactory API, and it’s quite easy to do well.. you can do something like this.. EDIT : ServiceRegistryBuilder is deprecated. you must use StandardServiceRegistryBuilder public void testConnection() throws Exception { logger.info(“Trying to create a test connection with the database.”); Configuration configuration = new Configuration(); configuration.configure(“hibernate_sp.cfg.xml”); StandardServiceRegistryBuilder ssrb = new … Read more