Oracle
1Z0-898 · Question #41
If an application uses an extended persistence context, which of the following is true?
The correct answer is C. The persistence context exists until the EntityManagerinstance is closed. 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.
EntityManager Operations
Question
If an application uses an extended persistence context, which of the following is true?
Options
- AThe persistencecontext exists until all transactions invoked by the EntityManager complete.
- BThe persistence context exists until all transactions invoked by the EntityManagar complete and
- CThe persistence context exists until the EntityManagerinstance is closed.
- DThe persistence context exists until the EntityManagerFactory instance is closed.
How the community answered
(29 responses)- A7% (2)
- B17% (5)
- C72% (21)
- D3% (1)
Explanation
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.
Topics
#extended persistence context#EntityManager scope#persistence context lifecycle
Community Discussion
No community discussion yet for this question.