JNDI lookup for bean [ejb3]
I've EAR with 2 modules:
a) ejb module, which contain 1 session bean:
public interface TestBean {...}
@Stateless
public class TestBeanImpl implements TestBean {...}
b) web module, which contains some *non managed* service, which needs access to above bean.
Question is - how can get access to this bean?
public MyService
{
public void serviceMethod()
{
new InitialContext().lookup("what should I put here?");
}
}
I've tried various combinations of jndi name. I've tried @Stateless (mappedName="..."). I've tried putting ejb-local-ref in web.xml of web module. And I've found dozens similar questions on the net, usually without answers or with nonworking answere. Is there any portable way to achieve above scenario? Is it really so complicated?

