Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Question about extended persistence context  RSS feed

 
Ramy Nady
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

I am preparing for JPA certification.

After studying the Pro JPA 2.0 book I also studied Enthuware exams.

There is some points I still need to understand.

I need to know until which point exactly the extended persistence context is exist ?

Is it exist until the EntityManager instance is closed , or until all transactions invoked by the EntityManager ?

Thanks in advance
 
Paul Anilprem
Enthuware Software Support
Ranch Foreman
Posts: 3983
31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ramy Diab wrote:Hello All,



I need to know until which point exactly the extended persistence context is exist ?

Is it exist until the EntityManager instance is closed , or until all transactions invoked by the EntityManager ?

Thanks in advance


As per Section 7.7 of JPA 2.0 specification:

The extended persistence context exists from the point at which the entity manager has been created
using EntityManagerFactory.createEntityManager until the entity manager is closed by means of EntityManager.close.


You should go through chapter 7 of the specification. It will solve all your doubts.
HTH,
Paul.
 
Ramy Nady
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Paul for your support here and in Enthuware discuss forums.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!