• 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
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Persistence Unit  RSS feed

 
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: 3273
296
Android Chrome Eclipse IDE
  • 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.
 
WARNING! Do not activate jet boots indoors or you will see a tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!