开发者

What is the default scope of an entity-manager-factory Seam component?

开发者 https://www.devze.com 2022-12-08 08:22 出处:网络
When we declare persistence units in Seam\'s components.xml, there\'s almost always a <persistence:entity-manager-factory> and a <persistence:managed-persistence-context>. Those two elemen

When we declare persistence units in Seam's components.xml, there's almost always a <persistence:entity-manager-factory> and a <persistence:managed-persistence-context>. Those two elements can have a scope attribute. What's the default scope of those two components? It's not stated in the 开发者_如何学Pythonxsd.


From documentation

<persistence:managed-persistence-context name="bookingDatabase" 
                              auto-create="true"
               persistence-unit-jndi-name="java:/EntityManagerFactories/bookingData"/>

This configuration creates a conversation-scoped Seam component named bookingDatabase

and according to api of EntityManagerFactory this component is in application scope

@Scope(value=APPLICATION)
@BypassInterceptors
@Startup
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号