Using the CMI EJB Service in Visual Composer

Prerequisites

  • You have installed SAP NetWeaver Developer Studio 7.1.

  • You have created the EJB development component in the JEE perspective.

  • You have created the Enterprise Application (EA) development component in the JEE perspective.

  • Prepare the development components so that the EJBs defined in the EJB development component can be used from another development component. In addition, select the Permissions tab and set the following check box: Entity Forwarding Allowed for EA DC .

  • You have created the Web Dynpro model that imports the EJB service into the Web Dynpro framework. More information: Models

  • Add the EJB model to the Public Part of the Web Dynpro development component.

  • You have built and deployed the EA and the Web Dynpro development component to the same server where the Visual Composer model will be deployed.

Context

You use a Common Model Interface (CMI) Enterprise Java Bean (EJB) to consume EJB services directly in Visual Composer instead of converting them into a Web service and then using the Web service in Visual Composer, as this can be time consuming.

You create the EJB services in the Java Enterprise Edition (JEE) perspective, import them into the Web Dynpro framework and then into Visual Composer.

Procedure

  1. In the Visual Composer perspective, create a development component and a model. More information: Creating a Model and Development Component
  2. Search and discover the EJB methods from the local EJB repository, which is created locally or in the DTR.

    You can select the EJB method from either of the two types in the Type field:

    • Methods : Select an EJB method directly.

    • WD Models : Lists all the Wed Dynpro models. Expand a model to view the EJB methods wrapped within the selected model.

  3. Drag the EJB service and drop it onto the Design board.
  4. Create the input and output views for the EJB service.

    When dragging out from a clustered input port of an EJB service, a Data Share element is not created, because there is a data binding connection between an EJB service and the view element.

    More information:

    Connecting Model Elements

    Composing the Composite View

  5. Save and then build and deploy the Visual Composer model.

    More information: Compiling and Deploying Models