Calling an Enterprise Bean

See Also

Calling an enterprise bean is the process of getting a reference to the enterprise bean so that you can call its methods. The IDE can assist you when calling an enterprise bean from any Java class in an EJB module, web application, or enterprise application client.

To call an enterprise bean:

  1. Open the IDE project that contains the enterprise bean that you want to call.
  2. Open the file from which you want to call the enterprise bean.
  3. In the Source Editor, right-click anywhere in the body of the class and choose Enterprise Resources > Call Enterprise Bean.
  4. In the dialog box, select the enterprise bean you want to call.
  5. If the project uses the J2EE 1.4 specification, select whether to use inline lookup code or use an existing service locator class.
  6. (Optional) Type a new name for the reference.
  7. 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.
  8. Click OK.

When you call an enterprise bean, the following occurs:

Notes:

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

Legal Notices