Sun Adapter for DB2 Tutorials

Creating the Connectivity Maps

Connectivity Maps provide the canvas for assembling and configuring a Project's components. The Sun Adapter for DB2 Projects use five Connectivity Maps, one for each Collaboration.

Creating a Connectivity Map involves three processes:

The Connectivity Map Designer includes a Connectivity Map Generator. The Connectivity Map Generator can read the Collaboration Definition or Business Process, and can automatically populate the Connectivity map with the necessary components, and bind the components. We will use the Connectivity Map Generator for this sample project.

This section contains the following topics:

Adding Connectivity Maps to a Project

The DB2 Project uses five Connectivity Maps.

ProcedureAdd the Connectivity Maps to the Project

  1. From the NetBeans IDE Projects window, right-click your project and select New -> Connectivity Map from the popup menu.

    The new Connectivity Map appears and adds a node on the Project tree labeled CMap1.

  2. Rename the new Connectivity Map to cmDelete.

  3. Repeat this process to create the other four Connectivity Maps for your project substituting the following names:

    • cmInsert

    • cmPsSelect

    • cmTableSelect

    • cmUpdate

Populating and Binding the Connectivity Maps using the Connectivity Map Generator

In a Connectivity Map, Adapters are associated with External Applications. For example, to establish a connection to an external DB2 server, you must first select the DB2External Application to use in the Connectivity Map. Along with the External Applications, Connectivity Maps also contain Services, Queues, Topics, Web Service External Applications, and so forth. Once the Connectivity Map contains the Collaboration or Business Process and the other components, you can bind the components to create the appropriate connections.

This process can be done manually by dragging the necessary components to the Connectivity Map canvas and binding the components, or you can use the Connectivity Map Generator. The connectivity Map Generator uses the information contained in the Java Collaboration Definition or Business Process, and assembles the Connectivity Map automatically.


Note –

The following steps walk you through populating the Connectivity Maps for the the prjDB2_JCD Project. These steps are the same for the prjDB2_BPEL Project. Simply substitute the appropriate Business Processes with the corresponding Java Collaborations, such as bpDelete for jcdDelete.


ProcedurePopulate the Connectivity Maps using the Connectivity Map Generator.

  1. From the Project tree, double-click the cmDelete node to open the cmDelete Connectivity Map.

  2. Drag the jcdDelete Java Collaboration onto the Connectivity Map canvas.

  3. From the Connectivity Map toolbar, click the Connectivity Map Generation button.

    The Connectivity Map Generator assembles the Connectivity Map.

    Image shows the newly generated cmDelete Connectivity
Map

    In the Connectivity Map, the nodes in the connections between the Collaboration and the External Applications represent the application adapters. The adapters are highlighted in red in the new Connectivity Map to indicate that the Connectivity Map properties have not been set.

  4. Save your current changes and click the X on the cmDelete tab to close the cmDelete Connectivity Map.

  5. Repeat these steps to populate and bind the other four Connectivity Maps as follows:

    • Generate the cmInsert using the jcdInsert Collaboration

    • Generate the cmPsSelect using the jcdPsSelect Collaboration

    • Generate the cmTableSelect using the jcdTableSelect Collaboration

    • Generate the cmUpdate using the jcdUpdate Collaboration

Next Steps

For your next step, see Creating an Environment.