Hi Sagar,
The Persisteny context is part of JPA (JSR-220,
Java Persistence API) and not part of this exam (it is not explained in the JSR-220,
EJB core specifications). The explanation is found in the JPA specs, and let me just copy a bit about extended persistence context from there:
3.3 Persistence Context Lifetime
When an extended persistence context is used, the extended persistence context exists from the time the EntityManager instance is created until it is closed. This persistence context might span multiple transactions and non-transactional invocations of the EntityManager. The extended persistence context is enlisted in the current transaction when the EntityManager is invoked in the scope of that transaction or when the stateful session bean to which the extended persistence context is bound is invoked in the scope of that transaction.
An EntityManager with an extended persistence context maintains its references to the entity objects after a transaction has committed. Those objects remain managed by the EntityManager, and they may be updated as managed objects between transactions. Navigation from a managed object in an extended persistence context results in one or more other managed objects regardless of whether a transaction is active. When an EntityManager with an extended persistence context is used, the persist, remove, merge, and refresh operations may be called regardless of whether a transaction is active. The effects of these operations will be committed to the database when the extended persistence context is enlisted in a transaction and the transaction commits.
More about the topic can be found in the JPA specs.
Regards,
Frits