Incorporating JBI Components into Java CAPS

Bidirectional Reuse Scenario A: Creating a JBI-Enabled EAR File

This scenario takes you through the steps for usng a repository-based Java CAPS project and using it in a JBI project.

Why would I want to learn about this?

If you have pre-existing repository-based CAPS projects, or if you want to develop components in a repository-based environment, you can use these steps to extend “classic” CAPS into the JBI environment.

What's the big picture?

Figure 1–3 Using the Java EE Service Engine to Communicate with Application EAR Files

Diagram of communication between the JBI container
and non-JBI components via an EAR file

Overview of Goals

    This scenario takes you through the following goals:

  1. Extending a repository-based project with a JBI Bridge

    In this simple but essential goal, you add a “JBI hook” to make a non-JBI CAPS project into a JBI-enabled one.

  2. Incorporating a JBI-enabled EAR file as a JBI module in a composite application project

    In this goal, you take hold of the “hook” created in the previous goal.

  3. Building and deploying the Composite Application project

    In this goal, you verify that the repository-based project is sending and receiving messages through the JBI bridge.

[...]

Extending a Repository-Based Project with a JBI Bridge

Before you begin: Ensure that a valid repository-based project exists, including at least one environment, at least one Java Collaboration Definition (JCD), and at least one connectivity map.

  1. Open the repository-based CAPS project.

  2. For each of its environments: Add a new external system of type JBIBRIDGE.

  3. For each of its connectivity maps: Drag a new instance of a JBIBRIDGE component onto the map, connect it to the input of the business logic, and configure the connection appropriately.

  4. Create new deployment profiles that reference the appropriate connectivity maps and environments.

  5. For each newly created deployment profile, automap its components and then build.

Result: You have created an EAR file that contains a JBI hook. Its services are now available for use within JBI projects.

Incorporating a JBI-Enabled EAR File As a JBI Module

Before you begin: If you do not already have a Composite Application project containing a BPEL module, create one. For example: 1. File New Project; category “SOA” and project type “BPEL Module”; name it prjBpel1. 2. File New Project; category “SOA” and project type “Composite Application”; name it prjCompApp1. 3. Right-click prjCompApp1 and choose Add JBI Module; then, in the Select Project dialog box, select prjBpel1, click its JAR file, and click Add project JAR Files, adding it under the JBI Modules folder.

To Incorporate a JBI-Enabled EAR File As a JBI Module

  1. Right-click the Composite Application project.

  2. In the Add CAPS Module wizard, step “Create CAPS Ear Link”, do the following:

    1. Supply the name of the CAPS repository.

    2. Browse to and select the deployment project.

    3. Choose an option specifying when the EAR is to be imported:

      • To import immediately, choose On add (now).

      • To import later, when the Composite Application project is first cleaned, choose On clean.

      • To postpone importation until the Composite Application project is first built, choose On build.

    4. Select an application server from the list.

  3. When you have supplied all values for the wizard, click Finish.

Building and Deploying the Composite Application Project

Procedure%TaskTitle%

  1. ...

  2. ...