June 2018
Intermediate to advanced
596 pages
12h 39m
English
You can access session beans either using the @EJB annotation (which injects the bean in the client class) or by performing the Java Naming and Directory Interface (JNDI) lookup. EJB containers are required to make JNDI URLs of the EJBs available to clients.
Injecting session beans using @EJB works only for managed components, that is, components of the application whose life cycle is managed by the EJB container. When a component is managed by the container, it is created (instantiated) and destroyed by the container. You do not create managed components using the new operator. JEE-managed components that support direct injection of EJBs are servlets, managed beans of JSF pages, and EJBs ...
Read now
Unlock full access