How to access EJBs
The basic steps for accessing EJBs from any type of client are:
- Retrieve the home interface
- Find or create an EJB instance
- Invoke the methods of the EJB instance
There are basically two ways to retrieve a home interface:
Access with fully qualified bean home name— You access a bean using its JNDI name. This is only possible for a remote home interface and should only be used for thin clients where no J2EE container is available. The JNDI name is stored in an extension of the deployment descriptor (ibm-ejb-jar-bnd.xmi).
Access with an EJB reference— You access a bean using an EJB reference that is defined in the deployment descriptor and that points to the EJB. The container is responsible for translating this ...