java - Does Spring support PersistenceContextType.EXTENDED? -
a @stateful ejb can use persistencecontexttype.extended reusing same entitymanager across multiple transactions. useful in implementing conversational scopes. spring have support this?
there short discussion of in implementing daos based on plain jpa:
the
@persistencecontext
annotation has optional attribute type, defaultspersistencecontexttype.transaction
. default need receive sharedentitymanager
proxy. alternative,persistencecontexttype.extended
, different affair: results in so-called extendedentitymanager
, not thread-safe , hence must not used in concurrently accessed component such spring-managed singleton bean. extendedentitymanagers
supposed used in stateful components that, example, reside in session, lifecycle ofentitymanager
not tied current transaction rather being application.
so no, doesn't sound spring supports them.
Comments
Post a Comment