Register / Login
Win a copy of
Kotlin in Action
this week in the
this forum made possible by our volunteer staff, including ...
Stephan van Hulst
Object Relational Mapping
Hibernate Ejb3Configuration + persistence.xml
Pedro Lobato Sena
posted 8 years ago
I'm configuring my EntityManager programatically, using:
Ejb3Configuration conf = new Ejb3Configuration(); EntityManagerFactory emf = conf.addProperties(prop).buildEntityManagerFactory();
I saw in hibernate documentation that is possible to configure it with orm.xml file. But all my mappings are in persistence.xml file.
I would like to know if is possible to configure my entityManager, using Ejb3Configuration and my persistence.xml file.
I would not like to mantain to almost-identical files in my system, specially a file that change so much, like persistence.xml
Thanks for your time,
SCWCD<br />SCJP<br /> <br />Pedro Henrique Lobato Sena
Boost this thread!
Programatic Schema Export with Hibernate and EJB3
Hibernate and Persistence.xml
Using Hibernate EntityManager
Injection exception, session bean not bound
No Persistence provider for EntityManager named...