...
- Server side beans should access other beans on the server via the default no args constructor (EJB 3 spec 15.3.1 Bean Provider's Responsibilities), in order to propagate the security .
- Container side lookup names must be preceded with java:comp/env, as in java:comp/env/myBean. e.g.
Code Block initialContext.lookup("java:comp/env/beanName")
- note that java:comp/env/ is empty by default, and you need to declare your references, whether via xml or annotations
- Declared via annotations
Code Block @EJB(name="myBean", beanInterface = IMyBean.class) public class DependentBean ....
- Declared via xml INCOMPLETE
- Declared via annotations
- Clients is a good reference for more complex lookups, including authentication.
...