It should not matter if it is an async start of not, the phase should
not advance until the service is actually started. This just uses normal
MSC service deps, and given that we use async start a fair bit it would
surprise me if it was at fault here.
Stuart
Thanks Stuart. Is there a way to get EAR subdeployments to run in the
same phase? Seems like the .war subdeployment is reaching the
POST_MODULE PHASE before the .jar subdeployment does.
I looked at updated TRACE logging output on the forum thread [1]. This
is for an ear deployment, that contains an EJB jar 'tcApp.jar' with
entity classes and a WEB jar that contains managed beans that the
JSFManagedBeanProcessor will load. The managed bean classes reference
the entity classes.
[2] shows that we are first starting the persistence unit (via
PersistenceProvider.createContainerEntityManagerFactory) for the
tcApp.jar subdeployment. However, the tcWeb.war subdeployment gets to a
later phase (POST_MODULE) [3] before the PersistenceUnitServiceImpl has
called StartContext.complete(). In the POST_MODULE [3]
JSFManagedBeanProcessor loads the referenced managed beans, which loads
the entity classes (see [4] which shows one of the entities being loaded).
By the time that PersistenceUnitServiceImpl has called
StartContext.complete() [5], several entity classes are already loaded.
Scott
[1]
https://community.jboss.org/thread/241821
[2] 2014-06-19 14:13:54,873 TRACE [org.jboss.as.jpa] (ServerService
Thread Pool -- 57) calling createContainerEntityManagerFactory for
pu=EnterpriseApplication1.ear/tcApp.jar#MyPU with integration
properties={eclipselink.archive.factory=org.jipijapa.eclipselink.JBossArchiveFactoryImpl,
eclipselink.target-server=org.jipijapa.eclipselink.JBossAS7ServerPlatform,
eclipselink.logging.logger=org.jipijapa.eclipselink.JBossLogger},
application properties={eclipselink.jpa.uppercase-column-names=true,
eclipselink.cache.size.default=5000, eclipselink.logging.level=FINE,
eclipselink.logging.logger=JavaLogger}
[3] 2014-06-19 14:13:55,408 INFO [org.jboss.as.jsf] (MSC service thread
1-10) !!!JSFManagedBeanProcessor deployment phase=POST_MODULE,
managedBean=tc.web.controller.settings.OrganizationConfigController,
module classloader=ModuleClassLoader for Module
"deployment.EnterpriseApplication1.ear.tcWeb.war:main" from Service
Module Loader
[4] 2014-06-19 14:13:55,434 TRACE [org.jboss.as.jpa] (MSC service thread
1-10) !!!JPADelegatingClassFileTransformer.transform
tc/entities/type/Attribute
[5] 2014-06-19 14:13:58,014 TRACE [org.jboss.as.jpa] (ServerService
Thread Pool -- 57) !!!PersistenceUnitServiceImpl startcontext marked
complete