About Question enthuware.oce-jpad.v6.2.456 :

All the posts and topics that contain only an error report will be moved here after the error is corrected. This is to ensure that when users view a question in ETS Viewer, the "Discuss" button will not indicate the presence of a discussion that adds no value to the question.

Moderators: Site Manager, fjwalraven

Post Reply
ramy6_1
Posts: 124
Joined: Wed Feb 12, 2014 2:44 am
Contact:

About Question enthuware.oce-jpad.v6.2.456 :

Post by ramy6_1 »

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

admin
Site Admin
Posts: 10046
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.oce-jpad.v6.2.456 :

Post by admin »

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.
If you like our products and services, please help us by posting your review here.

romsky
Posts: 39
Joined: Thu Jan 29, 2015 4:49 pm
Contact:

Re: About Question enthuware.oce-jpad.v6.2.456 :

Post by romsky »

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.

admin
Site Admin
Posts: 10046
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.oce-jpad.v6.2.456 :

Post by admin »

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!
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: No registered users and 31 guests