glassfish
  1. glassfish
  2. GLASSFISH-15721

"injection points in one bean deployment archive cannot be satisfied by a bean in a separate bean archive, even when they are from libraries in the same module (web archive)"

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 3.1_b39
    • Fix Version/s: 3.1.1_b05
    • Component/s: cdi
    • Labels:
      None

      Description

      The Bean Deployment Archive visibility graph does not correctly implement the spec.

      Beans in WEB-INF/lib are made availible to beans in WEB-INF/classes, however the converse is not true (i.e. beans is WEB-INF/classes cannot be injected into WEB-INF/lib injection points), and beans in one jar in WEB-INF/lib cannot be injected into beans in a different jar in WEB-INF/lib.

      According to the CDI and EE6 Platform spec both of these should work.

      https://svn.dev.java.net/svn/glassfish-svn/trunk/v3/web/weld-integration/src/main/java/org/glassfish/weld/DeploymentImpl.java

        Issue Links

          Activity

          Hide
          Scott Fordin added a comment -

          Added issue to 3.1 Known Issues section in 3.1-3.1.1 Release Notes.

          Show
          Scott Fordin added a comment - Added issue to 3.1 Known Issues section in 3.1-3.1.1 Release Notes.
          Hide
          scatari added a comment -

          Fix expected by first week of June.

          Show
          scatari added a comment - Fix expected by first week of June.
          Hide
          Sivakumar Thyagarajan added a comment -

          This issue has been fixed since the integration of Weld 1.1.1.Final (that fixes root cause WELD-846) into GlassFish 3.1.1(b4+) and GlassFish trunk.

          Through svn revision 47397, I have also added the following developer tests to cover this scenario
          javaee-integration/cdi-servlet-3.0-annotation-with-web-inf-lib/

          Show
          Sivakumar Thyagarajan added a comment - This issue has been fixed since the integration of Weld 1.1.1.Final (that fixes root cause WELD-846) into GlassFish 3.1.1(b4+) and GlassFish trunk. Through svn revision 47397, I have also added the following developer tests to cover this scenario javaee-integration/cdi-servlet-3.0-annotation-with-web-inf-lib/
          Hide
          cbarragan added a comment -

          As for Glassfish 3.1.1b11 I think the issue might not be solved, although my problem differs from the original issue.

          I have an EAR with an ejb module and some jars in the lib directory.
          A dependency in a class that resides in the lib directory cannot be satisfied. This dependency should be solved by a class in my ejb module, but it seems that the class in the ejb module is not visible to the class in the lib directory. Is this another issue? If so, is there an issue related to this problem?

          Show
          cbarragan added a comment - As for Glassfish 3.1.1b11 I think the issue might not be solved, although my problem differs from the original issue. I have an EAR with an ejb module and some jars in the lib directory. A dependency in a class that resides in the lib directory cannot be satisfied. This dependency should be solved by a class in my ejb module, but it seems that the class in the ejb module is not visible to the class in the lib directory. Is this another issue? If so, is there an issue related to this problem?
          Hide
          Sivakumar Thyagarajan added a comment -

          @cbarragan:

          As per section 5.1 of the CDI 1.0 specification:
          "In the Java EE module architecture, a bean class is accessible in a module if and only if it is required to be accessible according to the class loading requirements defined by the Java EE platform specification."

          In the scenario you had mentioned above: as the EJB module class is not required to be accessible to a jar in the lib directory, the bean class is not available for injection.

          Show
          Sivakumar Thyagarajan added a comment - @cbarragan: As per section 5.1 of the CDI 1.0 specification: "In the Java EE module architecture, a bean class is accessible in a module if and only if it is required to be accessible according to the class loading requirements defined by the Java EE platform specification." In the scenario you had mentioned above: as the EJB module class is not required to be accessible to a jar in the lib directory, the bean class is not available for injection.

            People

            • Assignee:
              Sivakumar Thyagarajan
              Reporter:
              stuartdouglas
            • Votes:
              20 Vote for this issue
              Watchers:
              16 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: