Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-14923

Update JPA handling to support `initialize-in-order`




      This is for exploring if `initialize-in-order` being set to true in application.xml should limit the persistence unit deployment such that:

      1. Components should only expect to reference persistence units in the same sub-deployment or top-level-deployment.
      2. Components should be able to have a dependency on persistence units from previously started sub-deployments (as per module order in application.xml).

      As per https://jakarta.ee/specifications/platform/8/platform-spec-8.html#a3201:

      8.5.4. Module Initialization

      After a successful deployment, all the modules of an application other than application client modules are initialized. The specifications for the different module types describe the steps required to initialize a module. By default, the order of initialization of modules in an application is unspecified. In rare cases it may be important that modules are initialized in a certain order, for example, if a component in one modules uses a component in another module during its initialization. An application can declare that modules must be initialized in the order they’re listed in the application deployment descriptor by including the <initialize-in-order>true</initialize-in-order> element in the application deployment descriptor. If the application deployment descriptor specifies a module initialization order that conflicts with the initialization order specified by any of the modules (for example, by the use of the Jakarta Enterprise Beans DependsOn annotation), the deployment tool must report an error. Application client modules are initialized on their own schedule, typically when an end user invokes them; as such, they are excluded from any initialization ordering requirements.


        Issue Links



              smarlow1@redhat.com Scott Marlow
              smarlow1@redhat.com Scott Marlow
              0 Vote for this issue
              3 Start watching this issue