Hello ,
In your explanation (In the four option) you mentioned:
"An application managed persistence context (which is always an extended persistence context) "
But application manged persistence context is different than extended persistence context.
application manged persistence context : the persistence context here managed by the application.
extended persistence context : the persistence context here is managed by the container.
As you know container managed persistence context can be one of two types : transaction which is the default and extended.
Please explain
About Question enthuware.oce-jpad.v6.2.456 :
Moderators: Site Manager, fjwalraven
-
- Posts: 124
- Joined: Wed Feb 12, 2014 2:44 am
- Contact:
-
- Site Admin
- Posts: 10046
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-jpad.v6.2.456 :
The explanation is correct. There are two orthogonal categories of contexts - scope wise (i.e. transaction scoped and extended) and management wise (i.e. application managed and container managed).
Application managed context's scope is always extended (which is what the statement in the explanation says). While container managed context's scope can be extended or transaction.
HTH,
Paul.
Application managed context's scope is always extended (which is what the statement in the explanation says). While container managed context's scope can be extended or transaction.
HTH,
Paul.
If you like our products and services, please help us by posting your review here.
-
- Posts: 39
- Joined: Thu Jan 29, 2015 4:49 pm
- Contact:
Re: About Question enthuware.oce-jpad.v6.2.456 :
The explanation for first variant is not complete.
==
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.
==
That is true for application managed extended persistence context, but not for container-managed one.
==
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.
==
That is true for application managed extended persistence context, but not for container-managed one.
-
- Site Admin
- Posts: 10046
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-jpad.v6.2.456 :
This short explanation is only to show a case that proves the statement wrong. It has now been enhance to show both possibilities. The details for both kinds of extended persistence context are given at the end of the question.
thank you for your feedback!
thank you for your feedback!
If you like our products and services, please help us by posting your review here.
Who is online
Users browsing this forum: No registered users and 34 guests