10 Replies Latest reply on Sep 3, 2006 10:10 AM by dennis zane

    @EJB injection gives null

    - - Newbie

      im using jboss 4.0.4.GA

      i got null on @EJB injection.

      i have 2 simple stateless beans.

      @Stateless
      @Local({LocalIntf1.class})
      @Remote({RemoteIntf1.class})
      public class Bean1 implements RemoteIntf1, LocalIntf1 {
      ...
      ...
      }

      the other bean uses the @EJB tag to reference Bean1.

      @Stateless
      @Local({LocalIntf2.class})
      @Remote({RemoteIntf2.class})
      public class Bean2 implements RemoteIntf2, LocalIntf2 {

      @EJB
      LocalIntf1 field;
      ...
      ...
      }

      field is always null.
      the injection doesnot work.

      i tried attributes of @EJB tag but none works.

      - name
      - beanName
      - beanInterface (not in jboss?)
      - businessInterface (jboss specific?)
      - mappedName(jboss specific?)