Incorporating JBI Components into Java CAPS

Bidirectional Reuse Scenario B: Using an EJB Locally or Remotely

This scenario takes you through the steps for using a web service Enterprise Java Bean (EJB) in JBI.

Why would I want to learn about this?

If you have used EJBs or servlets to expose your business logic as a web service, the web service can be plugged directly into the NMR. This allows other applications to call into an EJB, and allows an EJB to call into another web service through the NMR.

What's the big picture?

Figure 1–4 Calling an EJB Remotely: Multiple Containers

Diagram showing two JBI containers, allowing
an EJB to be called remotely

Overview of Goals

    This scenario takes you through the following goals:

  1. Creating a repository-based CAPS project with OTDs

    This step is optional if you already have a repository-based CAPS project whose OTDs you want to use in an EJB project.

  2. Adding connector resources to the GlassFish server

    Because this scenario uses JMS for communication, you will add resources for two JMS queues.

  3. Setting up an EJB Module project that uses OTDs and MDBs

    You will use the OTD Importer and create a message-driven bean (MDB).

  4. Adding and customizing code snips from the EJB Palette

    You will use drag-and-drop from the palette and the JMS JCA Wizard to seed your code with skeleton constructs. The actual implementation can vary.

[...]

Creating a Repository-Based CAPS Project with OTDs

%%%

ProcedureTo Verb an Object

Before You Begin

Do the needful.

  1. %%%

  2. %%%

ProcedureTo Verb an Object

Before You Begin

Do the needful.

  1. %%%

  2. %%%

Adding Connector Resources to the GlassFish Server

%%%

ProcedureTo Verb an Object

Before You Begin

Do the needful.

  1. %%%

  2. %%%

ProcedureTo Verb an Object

Before You Begin

Do the needful.

  1. %%%

  2. %%%

Setting Up an EJB Module Project that Uses OTDs and MDBs

%%%

ProcedureTo Verb an Object

Before You Begin

Do the needful.

  1. %%%

  2. %%%

Adding and customizing code snips from the EJB Palette

%%%

ProcedureTo Verb an Object

Before You Begin

Do the needful.

  1. %%%

  2. %%%