Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-888

Interceptors not resolvable from a WAR-module which is part of an EAR-deployment

    XMLWordPrintable

Details

    • Hide

      (1) probear_1.ear ["PROBlematic EAR"]
      This deployment recognizes beans, procuder and interceptor from probear-jar.jar.

      --+ META-INF
      — application.xml
      --+ lib
      [empty]
      --+ probear-web.war
      --+ META-INF
      — MANIFEST.MF
      --+ WEB-INF
      — classes (<---- calls beans, producer & interceptor)
      --+ lib
      — probear-jar.jar (<---- contains beans, producer & interceptor)
      — beans.xml
      — faces-config.xml
      — web.xml
      — home.xhtml
      — index.html
      — probear-business.jar

      (2) probear_2.ear ["PROBlematic EAR"]
      This deployment recognizes beans and procuder, but NOT interceptor from probear-jar.jar:
      --+ META-INF
      — application.xml
      --+ lib
      — probear-jar.jar (<---- contains beans, producer & interceptor)
      --+ probear-web.war
      --+ META-INF
      — MANIFEST.MF
      --+ WEB-INF
      — classes (<---- calls beans, producer & interceptor)
      --+ lib
      [empty]
      — beans.xml
      — faces-config.xml
      — web.xml
      — home.xhtml
      — index.html
      — probear-business.jar

      I attached two files:

      probear-jar.zip -> contains interceptor, use this jar to create the dependency to
      probear.zip -> contains the ear deployment, follow instructions in ear/pom.xml and web/pom.xml to shift dependency between EAR/lib and WAR/WEB-INF/lib

      Show
      (1) probear_1.ear ["PROBlematic EAR"] This deployment recognizes beans, procuder and interceptor from probear-jar.jar. --+ META-INF — application.xml --+ lib — [empty] --+ probear-web.war --+ META-INF — MANIFEST.MF --+ WEB-INF — classes (<---- calls beans, producer & interceptor) --+ lib — probear-jar.jar (<---- contains beans, producer & interceptor) — beans.xml — faces-config.xml — web.xml — home.xhtml — index.html — probear-business.jar (2) probear_2.ear ["PROBlematic EAR"] This deployment recognizes beans and procuder, but NOT interceptor from probear-jar.jar: --+ META-INF — application.xml --+ lib — probear-jar.jar (<---- contains beans, producer & interceptor) --+ probear-web.war --+ META-INF — MANIFEST.MF --+ WEB-INF — classes (<---- calls beans, producer & interceptor) --+ lib [empty] — beans.xml — faces-config.xml — web.xml — home.xhtml — index.html — probear-business.jar I attached two files: probear-jar.zip -> contains interceptor, use this jar to create the dependency to probear.zip -> contains the ear deployment, follow instructions in ear/pom.xml and web/pom.xml to shift dependency between EAR/lib and WAR/WEB-INF/lib

    Description

      It seems like CDI interceptors cannot be accessed from inside a WAR-module of an EAR deployment if the interceptor is defined inside a dependent JAR which is located in the EAR/lib directory.

      BUT:

      • Managed beans and producers from the same JAR work without problems.
      • Moving the dependency from EAR/lib to WAR/WEB-INF/lib makes the interceptor work without problems.

      I consider that a serious problem, because this is a substantial restriction for enterprise applications.

      Attachments

        1. probear.zip
          12 kB
        2. probear-jar.zip
          6 kB

        Issue Links

          Activity

            People

              sdouglas1@redhat.com Stuart Douglas
              asiandub_jira Jan Groth (Inactive)
              Votes:
              2 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: