4 Replies Latest reply on Jan 27, 2009 5:20 AM by Matt C

    Persistence unit and @Service deployment order has changed i

    Matt C Newbie

      My enterprise app relies on all persistence units being deployed when a particular @Service bean starts. The service scans all persistence units, and cannot know what persistence units there are at compile-time.

      In Jboss AS 4.2.x, the Persistence Units were started before session beans and service beans. Thus, there was no problem.

      In 5.0.0.GA the behaviour seems to have changed. Jboss AS 5 attempts to deploy the service in question before creating any Persistence Units.

      In a simpler use-case I could add an explicit dependency on my service, like this:


      This is not appropriate for my use case however. I need the service to wait for all persistence units to have started before it starts up... but the persistence units are not known at compile-time (It's a dynamic toolkit which scans for entity beans on startup.)

      How can I get this working again under JBoss 5.0.0.GA?
      Restoring the previous behavior of "deploy the Persistence Units first" would work.