3 Replies Latest reply on Aug 29, 2006 7:48 AM by Ionut S

    @EJB injection not working

    David Kopp Newbie

      I am going crazy trying to get EJB injection working. I made a simple test case to try and isolate this.

      @Local
      public interface Session1Local
      {
      public String sayHello();
      }

      @Stateless
      public class SessionBean1 implements Session1Local
      {
      public String sayHello() { return "hello"; }
      }

      @Remote
      public interface Session2Remote
      {
      public String sayHello();
      }

      @Stateless
      public class Session2Bean implements Session2Remote
      {
      @EJB
      private Session1Local s1l;

      public String sayHello() { return s1l.sayHello(); }
      }

      This should work just fine, but Session1Local is never injected into Session2Bean.

      Is anyone else experiencing trouble with this?