3 Replies Latest reply on Sep 16, 2010 8:55 AM by Marcel Kolsteren

    Extensions not loaded from War file inside EAR

    steven verborgh Newbie

      I have verified the following behavior by creating a simple project.


      I have a war project with following content:




      • empty /WEB-INF/beans.xml




      • /WEB-INF/classes/META-INF/services/javax.enterprise.inject.spi.Extension with:



      de.feo.tests.TestExtension





      • class file de.feo.test.TestExtension with:



      package de.feo.tests;
      
      import javax.enterprise.event.Observes;
      import javax.enterprise.inject.spi.AfterBeanDiscovery;
      import javax.enterprise.inject.spi.Extension;
      
      public class TestExtension implements Extension {
          static{
              System.out.println("XXXX CLASS LOADED XXXX");
          }
          public void test(@Observes AfterBeanDiscovery abd) {
              System.out.println("XXXX WORKING XXXX");
          }
      }



      When I deploy this war file on its own, I see the messages.
      When I deploy this project inside an ear, I don't see the messages.


      Is this normal? What is the expected behavior.


      I'm running this in glassfish v3