>
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.
So they do actually run in the same phase, kinda. With an ear first the
top level deployment runs a phase, and then all sub deployments run the
same phase in parallel.
I think the problem here is that NEXT_PHASE_DEPS only applies to the
current deployment. So all the modules will run FIRST_MODULE_USE, but
only the jar will actually wait for the PU to be installed before
running post module, the top level and war deployments will run
POST_MODULE to completion (but nothing more will happen until the jar
deployment has also run POST_MODULE).
I think you need to make sure that every deployment/subdeployment ends
up with the NEXT_PHASE_DEP set up.
Stuart
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