Overview of the ODA development process

This section provides the following information about the process to develop an ODA:

Tools for ODA development

An ODA is one of the possible components of an WebSphere Business Integration Adapter. An adapter includes run-time components to support communication between an integration broker and applications or technologies. One of these run-time components is the ODA, which creates the business object definitions for the connector to use at run time. The connector is the run-time component that handles communication between an application (or technology) and an integration broker. The adapter also includes an adapter framework, which includes components for the configuration, run time, and development of custom adapters in cases where a prebuilt adapter for a particular legacy or specialized application is not currently available as part of the WebSphere Business Integration Adapter product.

For development of an ODA, the adapter framework includes the development support listed in Table 22.

Table 22. Adapter framework support for the development of an ODA

Adapter component Configuration tool API
Business object definition Business Object Designer Not applicable
Object Discovery Agent (ODA) Business Object Designer Object Discovery Agent Development Kit (ODK)

Note:
The adapter framework also provides support for the development of connectors. For more information, see the Connector Development Guide for C++ or Connector Development Guide for Java.

In addition to the WebSphere Business Integration Adapter Framework, the Adapter Development Kit (ADK) is a toolkit that provides code samples of ODAs and connectors. For more information, see Adapter Development Kit.

Adapter Development Kit

The Adapter Development Kit (ADK) provides files and samples to assist in the development of an adapter. It provides samples for many of the adapter components, including an Object Discovery Agent (ODA), a connector, and a data handler. The ADK provides these samples in the DevelopmentKits subdirectory of the product directory.

Note:
The ADK is part of the WebSphere Business Integration Adapters product and requires a separate installation. Therefore, to have access to the development samples in the ADK, you must have access to the WebSphere Business Integration Adapters product and install the ADK. Please note that the ADK is available only for Windows systems.

Table 23 lists the samples that the ADK provides for the development of an ODA as well as the subdirectory of the DevelopmentKits directory in which they reside.

Table 23. ADK Samples for ODA Development

Adapter Development Kit component Description DevelopmentKits subdirectory
Object Discovery Agent Development Kit (ODK) Provides ODA samples Odk
Twineball adapter sample Provides a sample adapter, which includes an ODA Twineball_sample

As Table 23 shows, the Adapter Development Kit includes samples of Object Discovery Agents (ODAs). These samples reside in the following directory:

DevelopmentKits\Odk

For more information, see Development support for ODAs.

Note:
As Table 23 shows, the ADK also provides support for the development of connectors, another adapter component. For more information, see the Connector Development Guide for C++ or Connector Development Guide for Java.

Development support for business object definitions

Table 24 shows the tools that the WebSphere Business Integration Adapters and WebSphere InterChange Server products provide to assist in the development of business object definitions.

Table 24. Tools for development of business object definitions

Development tool Description
Business Object Designer Graphical tool that assists in the creation of business object definitions, either manually or through an ODA.

For a brief introduction to business object definitions, see Business object definitions.

Development support for ODAs

Table 25 shows the tools that the WebSphere Business Integration Adapters and WebSphere InterChange Server products provide to assist in the development of an ODA.

Table 25. Tools for development of ODAs

Development tool Description
Business Object Designer Graphical tool that assists in the creation of business object definitions, either manually or through an ODA.
Object Discovery Agent Development Kit (ODK)

Contains:

  • ODK API: a set of Java classes with which you can create a custom ODA. For an overview of these classes, see Overview of the ODK API.
  • ODA runtime: a set of Java classes that the ODA runtime uses to handle communication between the ODA and Business Object Designer
  • ODA samples: installed as part of the Adapter Development Kit (ADK). For more information, see Adapter Development Kit.

As Table 25 shows, the ODK provides for the ODA developer both the ODK API (which is the library of methods to use in the ODA) and sample ODAs, which reside in the following product subdirectory:

DevelopmentKits\Odk\Samples

The ODK includes the following sample ODAs

Table 26. Sample ODAs

ODA sample Description Subdirectory of DevelopmentKits\Odk
Roman Army ODA Converts the names of Roman generals and soldiers from an XML file to business object definitions and provides some binary files that describe the conversion. This ODA uses the ODK API, as described in this chapter.

For startup scripts: Samples

For external files and .jar file: RomanArmy

For Java source: com\ibm\btools\ODK2\RomanArmy

JDBC ODA

Converts JDBC data (tables and schemas) to business object definitions. For this sample ODA to run, it must have access to a JDBC database. This sample is based on a previous version of the ODK API, which handles generation of business object definitions only, not generation of file content.

Note:
If you are developing a new ODA, use this sample only as an example of more complex business-object-definition creation. Use the Roman Army ODA sample as an example of how your new ODA should be structured.

For startup scripts: Samples

For Java source: com\crossworlds\JDBC

For a brief introduction to ODAs, see Using an Object Discovery Agent to create a business object definition. For instructions on how to run the sample Roman Army ODA, see Using the sample ODA.

ODA development process

This section provides an overview of the ODA development process, which includes the following high-level steps:

  1. Install and set up the WebSphere business integration system software and install the Java Development Kit (JDK).
  2. Design and implement the ODA.

Setting up the development environment

Before you start the development process, the following must be true:

Note:
To create an ODA and test its generated content, you do not need to have an integration broker or a connector running. However, at some point, the connector must be running to test that the ODA's generated content correctly describes the connector's business objects. To test the entire WebSphere business integration system, the integration broker and the connector must be able to communicate.

Stages of ODA development

To develop an ODA, you must take the steps listed in Table 27.

Table 27. Steps in the development of an ODA


ODA development step For more information
1.

Extend the ODA base class, ODKAgentBase2, to create your ODA class.

Extending the ODA base class
2.

Implement the methods of the ODA class, which provide the means of starting the ODA.

Starting the ODA
3.

Design and implement the ODA content:

  • Which content types the ODA supports:
    • Business object definitions: implement the IGeneratesBoDefs interface (required)
    • Binary files: implement the IGeneratesBinFiles interface (optional)
  • Which content protocols the ODA uses:
    • on request (required for business object definitions)
    • callback

Determining the ODA generated content
4.

Implement error and message handling for all ODA methods. Implement trace messages at the appropriate trace levels.

Handling exceptions and Handling trace and error messages
5.

Create any classes needed to handle data-source interactions, such as:

  • Connection management
  • Content analysis and definition

IBM recommends that you modularize the Object Discovery Agent into component classes that handle its separate significant processes. Details depend on your data source.
6.

Build the ODA.

Compiling the ODA
7.

Create a startup script for the new ODA.

Starting up a new ODA
8.

Test and debug the ODA, recoding as necessary.


Writing ODA code is only one part of the overall task for developing business objects. Before beginning to write the Object Discovery Agent code, you should clearly understand business object design issues, the application whose entities the business objects will represent, and the connector and data handler that will process the business objects. You should also be familiar with the steps users follow in Business Object Designer to create a business object definition using an Object Discovery Agent.

Note:
For information on business object design, refer to Business object design. For information on using an Object Discovery Agent in Business Object Designer, see Using an Object Discovery Agent to create a business object definition.

Copyright IBM Corp. 1997, 2004