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
加载中,请稍侯......
精彩评论