Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1
    • Fix Version/s: 3.1_dev
    • Component/s: deployment
    • Labels:
      None
    • Environment:

      Description

      Running trivial EAR with WEB module (JSF2.0) which uses CDI to create a named bean and access that bean from index.xhtml page does not work on glassfish-3.1-b31-11_28_2010. The application runs fine on GF3.0.1. Using @ManagedBean annotation instead of @Named resolves the problem on 3.1. Therefore something must be wrong with CDI.

      The test application can be found here: http://netbeans.org/bugzilla/attachment.cgi?id=103394 - it is Maven based app attached to NetBeans issue 177230.

        Issue Links

          Activity

          Hide
          Sivakumar Thyagarajan added a comment - - edited

          This seems to similar as this other issue?
          http://java.net/jira/browse/GLASSFISH-11536

          The APPLICATION_LOADED events has the application level classloader as the thread context classloader and the MODULE_LOADED event has the module classloader as the thread context classloader, seems CDI code should listen to MODULE_LOADED event instead?

          Show
          Sivakumar Thyagarajan added a comment - - edited This seems to similar as this other issue? http://java.net/jira/browse/GLASSFISH-11536 The APPLICATION_LOADED events has the application level classloader as the thread context classloader and the MODULE_LOADED event has the module classloader as the thread context classloader, seems CDI code should listen to MODULE_LOADED event instead?
          Hide
          Sivakumar Thyagarajan added a comment -

          Transferring this issue back to me. The current state of the EARClassLoader and its use as TCL, will be raised as a separate issue if needed. A fix for this issue could be handled in the Weld integration side. During Bean deployment, when Weld loads Beans classes, GlassFish could either

          • set the appropriate module classloader as TCL and let the Weld's DefaultResourcesLoader pick this TCL to load the class or
          • use a custom ResourceLoader that is aware of the module classloader of the bean.

          The former approach is being investigated and a fix is available. Will commit after review/tests.

          Show
          Sivakumar Thyagarajan added a comment - Transferring this issue back to me. The current state of the EARClassLoader and its use as TCL, will be raised as a separate issue if needed. A fix for this issue could be handled in the Weld integration side. During Bean deployment, when Weld loads Beans classes, GlassFish could either set the appropriate module classloader as TCL and let the Weld's DefaultResourcesLoader pick this TCL to load the class or use a custom ResourceLoader that is aware of the module classloader of the bean. The former approach is being investigated and a fix is available. Will commit after review/tests.
          Hide
          Sivakumar Thyagarajan added a comment -

          Commited the following change to fix this issue.

          Sending weld-integration/src/main/java/org/glassfish/weld/BeanDeploymentArchiveImpl.java
          Sending weld-integration/src/main/java/org/glassfish/weld/WeldDeployer.java
          Transmitting file data ..
          Committed revision 43350.

          Show
          Sivakumar Thyagarajan added a comment - Commited the following change to fix this issue. Sending weld-integration/src/main/java/org/glassfish/weld/BeanDeploymentArchiveImpl.java Sending weld-integration/src/main/java/org/glassfish/weld/WeldDeployer.java Transmitting file data .. Committed revision 43350.
          Hide
          alniks added a comment -

          I am having a java.lang.ClassNotFoundException for the @Interceptor in WAR archive when I try to deploy an EAR archive on GF 3.1.1 with CDI enabled in WAR and EJB JAR archives. The application deploys fine on JBoss 7.

          Show
          alniks added a comment - I am having a java.lang.ClassNotFoundException for the @Interceptor in WAR archive when I try to deploy an EAR archive on GF 3.1.1 with CDI enabled in WAR and EJB JAR archives. The application deploys fine on JBoss 7.

            People

            • Assignee:
              Sivakumar Thyagarajan
              Reporter:
              David Konecny
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: