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

Home interface

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 ...

Get EJB 2.0 Development with WebSphere Studio Application Developer now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.