About Question enthuware.oce-jpad.v6.2.457 :
Posted: Tue Jul 17, 2018 6:39 pm
Regarding the explanation of application managed extended persistence context:
but from JPA 2.0 spec:An extended persistence context obtained from the application-managed entity manager is a stand-alone persistence context—it is not propagated with the transaction.
An application-managed entity manager may be either a JTA entity manager or a resource-local entity
The persistence context is propagated across the entity manager instances as the JTA transaction is
If an entity manager is then invoked from within the component:
- Invocation of an entity manager defined with PersistenceContext-
Type.EXTENDED will result in the use of the existing extended persistence context
bound to that component.
Can we conclude that it will be propagated with the transaction (if the JTA transaction is propagated)?If a component is called and the JTA transaction is propagated into that component:
- if there is a persistence context bound to the JTA transaction, that persistence con-
text is propagated and used