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

    Details

    • Type: Enhancement
    • Status: Resolved (View Workflow)
    • Priority: Optional
    • Resolution: Rejected
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: CDI / Weld, Class Loading
    • Labels:
      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);
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                swd847 Stuart Douglas
                Reporter:
                rsmeral Ron Šmeral
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: