Hello,
I'm trying to lookup a stateless session bean from an JSF managed bean.
The session bean has a remote interface:
@Remote
public interface MyBean { ... }
The implementing class:
@Stateless
public class MyBeanImpl extends MyBean { ... }
And the JSF managed bean where I want to access the MyBean instance:
public class JSFBean {
private MyBean bean;
public JSFBean() {
InitialContext ctx = new InitialContext();
bean = (MyBean) ctx.lookup(MyBean.class.getName());
}
}
What is the right way to look up the bean?
cheers,
Gerald