[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...

Scott Marlow smarlow at redhat.com
Fri Jun 13 17:15:46 EDT 2014


If we don't have anything built in already, we probably could introduce 
another service that synchronously waits for the async activity to 
completely start and is marked with NEXT_PHASE_DEPS so that the next 
deployment phase doesn't start until the background task has completed.

Something else?

Scott

On 06/13/2014 02:52 PM, 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.)
>
> 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