Jul 21st, 2006, 09:55 AM
PersistencContextType.EXTENDED semantics in Spring-Applications with Java SE?
what is exactly the semantic of an Extended Entity Manager injected by Spring with JPA injection based on
annotation within a Java SE environment? To my understanding:
The PersistenceAnnotationBeanPostProcessor calls
If not running with a standalone JTA environment like JOTM, it seems that I receive an "Application-managed EntityManager" which is still open after tx-completion. Does this approach have any advantages over injecting the EMF with
@PersistenceUnit(name = "CustomerService")
and explicitely manage the lifecycle of an EntityManager created by the factory?
In addition I have the question how the tx scoping works on the Extended Entity Manager with Spring. Using one DAO calling another DAO with Transaction-Scoped PersistenceContext, the tx scope is working in alignement with the JPA Spec. How is the semantic with using an Extended Persistence Context on both DAOs? Doing this with two @Stateful DAOs within a Java 5 EE environment the Container is capable of managing the inheritance of the Extended Persistence Context. Can anyone detail the concepts of Spring 2.0 on this issue.
Thanks in advance and best regards