2 Replies Latest reply on Aug 18, 2008 4:18 PM by sodium

    Help with application scope

    sodium
      @Local
      public interface TestApp
      {
              public void destroy();
      }
      
      @Name("testApp")
      @Scope(ScopeType.APPLICATION)
      @Startup
      public class TestAppAction implements TestApp
      {
              @Destroy @Remove
              public void destroy() {}
      }
      
      public class Test {
              @In(create=true)
              TestApp testApp;
              
              public void test() {
                      if (testApp == null)
                              System.out.println("testApp is null");
              }
      }





      I've tried with and without (create=true) and without the @In as well. It keep saying my testApp is null. Is there anything that i need to do to make sure that i can use this application scope bean? Any advice will be much appreciated.