Starting a Java Persistence project The Hibernate configuration (Photography web hosting)
Starting a Java Persistence project The Hibernate configuration file previously had a list of all XML mapping files. This has been replaced with a list of all annotated classes. If you use programmatic configuration of a SessionFactory, the addAnnotatedClass() method replaces the addResource() method: // Load settings from hibernate.properties AnnotationConfiguration cfg = new AnnotationConfiguration(); // … set other configuration options programmatically cfg.addAnnotatedClass(hello.Message.class); SessionFactory sessionFactory = cfg.buildSessionFactory(); Note that you have now used AnnotationConfiguration instead of the basic Hibernate Configuration interface this extension understands annotated classes. At a minimum, you also need to change your initializer in HibernateUtil to use that interface. If you export the database schema with an Ant target, replace
Searching for affordable and reliable webhost to host and run your web applications? Go to our java web server services and you will be pleased.