Register / Login
Win a copy of
Java Mock Exams (software)
this week in the
Programmer Certification (OCPJP)
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
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
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...