Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-6005

The weld-core module should not be loaded by default when beans.xml is found

    XMLWordPrintable

Details

    • Enhancement
    • Status: Resolved (View Workflow)
    • Optional
    • Resolution: Rejected
    • None
    • None
    • CDI / Weld, Class Loading
    • None

    Description

      AS7 automatically loads the weld-core module with any deployment which contains the beans.xml marker file. This doesn't seem like best practice. Only the APIs should be exposed by default.
      From weld/src/main/java/org/jboss/as/weld/deployment/processors/WeldDependencyProcessor.java:

      addDependency(moduleSpecification, moduleLoader, JAVAX_PERSISTENCE_API_ID);
      addDependency(moduleSpecification, moduleLoader, JAVAEE_API_ID);
      addDependency(moduleSpecification, moduleLoader, JAVASSIST_ID);
      addDependency(moduleSpecification, moduleLoader, WELD_CORE_ID);
      addDependency(moduleSpecification, moduleLoader, WELD_API_ID);
      addDependency(moduleSpecification, moduleLoader, WELD_SPI_ID);
      

      Attachments

        Activity

          People

            sdouglas1@redhat.com Stuart Douglas
            rsmeral Ron Šmeral (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: