• Post Reply Bookmark Topic Watch Topic
  • New Topic

Persistence Unit  RSS feed

 
Sudhanshu Mishra
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
 
Frits Walraven
Creator of Enthuware JWS+ V6
Saloon Keeper
Posts: 2986
223
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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!