Call Enterprise Bean Dialog Box

See Also

This dialog box generates a reference to an enterprise bean in a Java class file. Once you have a reference to the bean's local or remote interface, you can call the bean's business methods.

You open the dialog box by right-clicking in the file to which you want to add the lookup code and choosing Enterprise Resources > Call Enterprise Bean. The file must be located in an EJB module project or web application project. You cannot run the comand from a .

You use the dialog box in the following way:

  1. The top panel lists all of the enterprise beans in the currently opened projects. If the file you ran the command on is in a free-form EJB project, the panel only lists the enterprise beans in the same project. You cannot call an enterprise bean in another project from a free-form EJB project.
    Select the enterprise bean you want to call.
  2. Select whether to use inline lookup code or use an existing service locator class.
  3. Specify whether to reference the local interface or the remote interface. In order to reference a bean's local interface, the class that is referencing the bean must be packaged in the same enterprise application as the enterprise bean.
  4. Click OK.

When you call an enterprise bean, the following occurs:

See Also
Adding a Module to an Enterprise Application
Configuring EJB Deployment Descriptors
Using a Service Locator
Defining a Business Method
Creating an Enterprise Bean

Legal Notices