开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜