[wildfly-dev] does Attachments.NEXT_PHASE_DEPS wait for async services or does the next DUP phase start as soon as the service.start returns...

Stuart Douglas stuart.w.douglas at gmail.com
Sat Jun 14 10:40:40 EDT 2014



Scott Marlow wrote:
> Hi,
>
> In PersistenceUnitServiceHandler [1], we are creating the persistence
> unit service (PersistenceUnitServiceImpl [2]) and specifying
> Attachments.NEXT_PHASE_DEPS for the service that are creating.
>
> What happens when the service [2] is started asynchronously?  Will the
> next deployment phase start as soon as the async service is started?  Or
> will the next deployment phase as soon as the
> PersistenceUnitServiceImpl.start method returns?  I suspect that it is
> as soon as the async start method returns, which means that the JPA
> ordering is wrong (with respect to allowing the persistence provider to
> rewrite entity classes completely before the POST_MODULE phase starts
> for the deployment.)

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

>
> This came up with an EclipseLink issue [3] with weaving not working in
> an EAR that contains war (with JSF managed beans) and a jar that has a
> persistence unit/entities.  The managed bean classes (indirectly)
> reference the entity classes, which causes them to be loaded during the
> POST_MODULE phase.  We are reaching the POST_MODULE phase sooner than I
> expected.
>
>
> Scott
>
>
> [1]
> https://github.com/wildfly/wildfly/blob/master/jpa/src/main/java/org/jboss/as/jpa/processor/PersistenceUnitServiceHandler.java#L424
>
> [2]
> https://github.com/wildfly/wildfly/blob/master/jpa/src/main/java/org/jboss/as/jpa/service/PersistenceUnitServiceImpl.java#L192
>
> [3] https://community.jboss.org/message/878100#878100
> _______________________________________________
> wildfly-dev mailing list
> wildfly-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/wildfly-dev


More information about the wildfly-dev mailing list