Previous Next vertical dots separating previous/next from contents/index/pdf

Using an EJB Control

You can add an EJB control to any of the following:

To Insert a New EJB Control

To create a new EJB control and insert it into your source code in a single step:

  1. Make sure you have opened the target web service, page flow controller or control in the editor window.
  2. Right click on the editor window and choose Insert > Control.

    Under New System Control, click on EJB Control and click OK.

  3. Follow the instructions in Creating a New EJB Control.

To Insert an Existing EJB Control

  1. Make sure you have opened the target web service, page flow controller, control or JSP in the editor window.
  2. Right click on the editor window and choose Insert > Control.

    Click on the name of the control and click OK.

Accessing the Methods of an EJB

After you have created an EJB Control, you can invoke a target EJB method via the EJB control. Specifically, the EJB control exposes all and only the EJB methods defined in the EJB interfaces that the control extends. You can invoke these methods simply by invoking the method with the same signature on your EJB control.

The EJB control automatically manages locating and referencing the EJB instance, and directs method invocations to the correct instance of the target EJB. Whether or not you must first create an instance of the target EJB using the EJB's create method depends on whether the EJB control references a session or an entity bean. Consult the Beehive documentation for EJB control for more information.

Related Topics

Overview: Enterprise JavaBeans and EJB Controls

Creating a New EJB Control

Getting Started with Session Beans

Getting Started with Entity Beans

 

Skip navigation bar   Back to Top