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 xsd.
views:
234answers:
1
+2
A:
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
cetnar
2009-10-15 07:41:10