Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question about extended persistence context

 
Ramy Nady
Ranch Hand
Posts: 114
  • 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 Hand
Posts: 3817
10
  • 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: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Paul for your support here and in Enthuware discuss forums.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic