This content has been marked as final.
Show 1 reply
-
1. Re: how to create a sessionFactory without hibernate.cfg.xml in as7
smarlow Sep 1, 2011 8:42 AM (in response to jedierikb)org.hibernate.service.ServiceRegistryBuilder is replacing org.hibernate.cfg.Configuration (mentioned here http://planet.jboss.org/post/hibernate_core_4_0_0_alpha3_release).
You can also inject from a JPA @PersistenceUnit into a Hibernate SessionFactory variable (if you ever decide to try using JPA). Example of this from a test is here https://github.com/jbossas/jboss-as/blob/master/testsuite/integration/src/test/java/org/jboss/as/testsuite/integration/jpa/hibernate/SFSBHibernateSessionFactory.java