• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

Persistence Unit

 
Ranch Hand
Posts: 238
1
Eclipse IDE Fedora Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Referring to Pro JPA2, it is mentioned in Chapter 2 that persistence unit and entity manager factory have 1:1 correspondance.
But I tried in my application to create more than one EntityManagerFactory using same persistence unit. I used Persistence class to create EntityManagerFactory.

So, how is it one-to-one correspondance?
Please help.

Thanks,
Sudhanshu
 
Creator of Enthuware JWS+ V6
Posts: 3293
296
Android Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think that is how you would look at it from a logical view, however there is (at least I can't find one) no restriction in the JPA specifications that there should only be one EntityManagerFactory per persistence unit.
 
today's feeble attempt to support the empire
professionally read, modify and write PDF files from Java
https://products.aspose.com/pdf/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!