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, defaults persistencecontexttype.transaction. default need receive shared entitymanager proxy. alternative, persistencecontexttype.extended, different affair: results in so-called extended entitymanager, not thread-safe , hence must not used in concurrently accessed component such spring-managed singleton bean. extended entitymanagers supposed used in stateful components that, example, reside in session, lifecycle of entitymanager not tied current transaction rather being application.

so no, doesn't sound spring supports them.


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -