[jboss-user] [EJB 3.0] - @EJB injection gives null

kgrjb do-not-reply at jboss.com
Sun Jul 16 23:08:31 EDT 2006


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?)







View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3958358#3958358

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3958358



More information about the jboss-user mailing list