glassfish
  1. glassfish
  2. GLASSFISH-18349

Injections of incorrectly-scoped resources in application.xml

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.0
    • Fix Version/s: 4.0
    • Component/s: deployment
    • Labels:
      None

      Description

      resources declared in application.xml apply to the entire application, and need to be in java:app namespace. Resource names in java:module, java:comp, or unqualified names should not be processed.

      In the current implementation, injections of such incorrect resources are honored as if they were declared in the current module or component namespace. But lookup of such incorrect resources does fail as expected.

      The reason could be, the injection is performed by the container on behalf of the application. The container may have a broader view than the application doing lookup.

        Activity

        Hide
        Cheng Fang added a comment -

        devtests/ejb/ejb31/full/ear has <env-entry> in application.xml and can be used for testing this issue.

        Show
        Cheng Fang added a comment - devtests/ejb/ejb31/full/ear has <env-entry> in application.xml and can be used for testing this issue.
        Hide
        Cheng Fang added a comment -

        they must be in java:app or java:global namespace. Otherwise it must be reported as deployment error to the Deployer.

        Show
        Cheng Fang added a comment - they must be in java:app or java:global namespace. Otherwise it must be reported as deployment error to the Deployer.
        Hide
        Cheng Fang added a comment -

        assign to deployment team to implement this requirement.

        Show
        Cheng Fang added a comment - assign to deployment team to implement this requirement.
        Hide
        Hong Zhang added a comment -

        Will implement this as part of the Java EE 7 spec work (this part of the behavior is clarified in Java EE 7).

        Show
        Hong Zhang added a comment - Will implement this as part of the Java EE 7 spec work (this part of the behavior is clarified in Java EE 7).
        Hide
        Hong Zhang added a comment -

        Naman has recently added validation to reject deployment when java:module and java:comp resources are used in application.xml, reassign to him to confirm this is fixed and mark the issue as fixed.

        Show
        Hong Zhang added a comment - Naman has recently added validation to reject deployment when java:module and java:comp resources are used in application.xml, reassign to him to confirm this is fixed and mark the issue as fixed.
        Hide
        naman_mehta added a comment -

        Added fix for <env-entry>, CRD, MRD, DSD.

        Sending deployment/dol/src/main/java/com/sun/enterprise/deployment/util/ApplicationValidator.java
        Transmitting file data .
        Committed revision 55649.

        Show
        naman_mehta added a comment - Added fix for <env-entry>, CRD, MRD, DSD. Sending deployment/dol/src/main/java/com/sun/enterprise/deployment/util/ApplicationValidator.java Transmitting file data . Committed revision 55649.

          People

          • Assignee:
            naman_mehta
            Reporter:
            Cheng Fang
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: