glassfish
  1. glassfish
  2. GLASSFISH-15119

CDI Interceptor still not working in OSGi

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 3.1_b31
    • Fix Version/s: future release
    • Component/s: cdi, OSGi-JavaEE
    • Labels:
      None
    • Environment:

      Tested with promoted b32

      Description

      I just revisited GLASSFISH-13513 and GLASSFISH-14831 to see if it is possible to plug in interceptors the CDI way around EJBs.

      Indeed when deploying a prepared package as non-OSGi the interceptor gets invoked but not when using OSGi deployment.

      Therefore I made up another test case which should be sufficient for a confirmation of this issue:

      • maven reactor build with 4 modules
      • build.sh script for test:
      • "mvn clean install"
      • copy resulting artifacts into .../autodeploy/bundles/ folder of a running glassfish domain
      • wait for (re-)deployment
      • using "curl" to call the web service
      • search for a fault inside the returned XML

      So basically for a test I issue a command like this:

      $ GF_DOMAIN_DIR=/srv/servers/gf-3.1-b32/glassfish/domains/domain1/ ./build.sh

      Well, I also can say that with the old @Interceptors(

      {SecurityInterceptor.class}

      ) method the interceptor is being called so I suspect it is not injected at all.

      This test throws a fault if the interceptor is being invoked. If no fault occurs and the response is valid there must be something wrong.

      1. interceptor-osgi-test.tar.bz2
        6 kB
        Sivakumar Thyagarajan
      2. interceptor-osgi-test-2.tar.gz
        8 kB
        chaoslayer
      3. interceptor-osgi-test-2-fixed.tar.gz
        8 kB
        chaoslayer

        Issue Links

          Activity

          Hide
          Sivakumar Thyagarajan added a comment -

          Marking as 3_1-next as this was targetted for 3.1+ releases

          Show
          Sivakumar Thyagarajan added a comment - Marking as 3_1-next as this was targetted for 3.1+ releases
          Hide
          Sivakumar Thyagarajan added a comment -

          Marked issue as "Major"

          Show
          Sivakumar Thyagarajan added a comment - Marked issue as "Major"
          Hide
          Sivakumar Thyagarajan added a comment -

          Moving a fix for this to a "future release" as the dependent issue GLASSFISH-15249 is also moved.

          There is a workaround for this issue as Sahoo points out above.

          Show
          Sivakumar Thyagarajan added a comment - Moving a fix for this to a "future release" as the dependent issue GLASSFISH-15249 is also moved. There is a workaround for this issue as Sahoo points out above.
          Hide
          TangYong added a comment -

          siva, sahoo,

          Please add a osgi-javaee component for the issue.

          Show
          TangYong added a comment - siva, sahoo, Please add a osgi-javaee component for the issue.
          Hide
          TangYong added a comment -

          Because the bug depends on GLASSFISH-15249 which will be implemented in future release, fix version is adjusted into future release.

          Show
          TangYong added a comment - Because the bug depends on GLASSFISH-15249 which will be implemented in future release, fix version is adjusted into future release.

            People

            • Assignee:
              mtaube
              Reporter:
              chaoslayer
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: