[jboss-user] [EJB 3.0] - @EJB injection not working

dkkopp do-not-reply at jboss.com
Thu Aug 24 15:57:33 EDT 2006


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?

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

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



More information about the jboss-user mailing list