Purpose

Procedural Adapter Objects (PAO) are the entities used to access third tier, back-end systems such as CICS or IMS. These objects are built and unit-tested entirely in the VisualAge for Java (VAJ) IDE. Using the Enterprise Access builder feature of VisualAge for Java, a new class that inherits from EntityProceduralAdapterObject must be created. This class introduces four abstract methods, commonly called CRUD functions, that require implementations:

  • create()
  • retrieve()
  • update()
  • delete()

These methods correspond to the four data access mechanisms driven by the Component Broker framework when activating or passivating objects in the Component Broker server. As attributes, or properties, are defined for a class within VisualAge for Java, getter and setter methods are created for the attributes.

The PAOKey object inherits from BusinessObjectKey. A key is used to locate its target object, an EntityProceduralAdapterObject, in the current object space. The name of the key class created must be the name of the target PAO with "Key" appended at the end.

The beans commonly known as PAOs, extend com.ibm.ivj.eab.businessobject.BusinessObject. The BusinessObject class is commonly referred to in the documentation for VisualAge for Java as a Business Object, and is used in the Enterprise Access Builder (EAB) support. Component Broker introduces the EntityProceduralAdapterObject class, an EAB BusinessObject with some additional function for supporting Component Broker, to provide an easy integration with a Component Broker Data Object, which uses the "CRUD" methods, to interact with a persistent store such as CICS. The EntityProceduralAdapterObject class also provides some run-time support for BusinessObjects that allows them to function within a Component Broker server.

Related Rational Unified Process activity: Activity: Build PAOs for Persistence.

Overview

This tool mentor is applicable when using VisualAge for Java 3.0, Enterprise Access Builder to build PAOs.

Tool Steps

To build a PAO:

  1. Choose the PAO type
  2. Build the PAO using VisualAge for Java
  3. Test the PAO using VisualAge for Java
  4. Export the PAO from VisualAge for Java
  5. Import the PAO into Object Builder

1. Choose the PAO type To top of page

Choosing the appropriate type of PAO to build will depend on the deployment environment. Ensure you have the necessary copy books and MFS files. These will be available from the deployment and operations staff. Understanding the transactions may involve using them to discover the various ways they can be navigated and how they react to various inputs. It may also involve looking at the underlying source code to fully understand what the transaction is doing. The more you understand about the existing transactions, the easier it is to develop the wrappers to map them to objects within Component Broker.

For details, use the Component Broker Procedural Application Adaptor Development Guide topic, "Developing a PAA application".

Mapping the procedural data to objects is a non-trivial task and has to be well thought out.

2. Build the PAO using VisualAge for Java To top of page

To build the PAO, you will be using the Enterprise Access Builder feature of the IBM VisualAge for Java product.

Refer to Procedural Application Adaptor Development Guide, "Appendix E. Interchange files within VisualAge for Java".

  1. Make sure you add push-down methods as new method features on your PAO. If you do not, these methods will not be available for mapping after an import into Object Builder.

    Component Broker enables these methods to be pushed-down from the Business Object into the PAO. The PAO can then delegate to the associated CICS or IMS transaction to run the business logic on a tier-3 system. These push-down methods may use attributes that have already been modified on their PAO. Therefore, the Component Broker framework ensures that these updates get driven to the datastore prior to invoking any push-down methods. Similarly, the framework also ensures that those attributes get refreshed from the underlying datastore, since the push-down method queues may alter the values in the underlying datastore.

  2. Make sure you add the features you need to map to input and output buffers for the PAO commands.
  3. To enable a single PAO to access multiple transactions, you will need to modify the VAJ generated code. The same is true for variable length of input buffers to transactions.
  4. Output buffers are padded with spaces to fit the defined length of the output buffer. Multiple buffer segments pose a challenge.

3. Test the PAO using VisualAge for Java To top of page

Use VisualAge for Java to unit test the PAO. Stub versions can be created by modifying the insert(), retrieve(), update(), and delete() methods on the PAO. This task involves ensuring that the environment is ready to allow unit testing.

Note: It could take weeks to prepare a back-end system for PAO access.

  1. It may help to place the PAO JAR in the user classpath soon after development is complete.
  2. Merely replacing the PAO JAR with a new implementation is possible and helps in debugging. However, the assumption is that no changes are made to the PAO bean properties.

For details, see the Component Broker Procedural Application Adaptor Development Guide topic, "Developing a PAA application".

Problem determination in the VisualAge for Java unit test environment can be facilitated with a knowledge of the debugger and the tracing capability. 

See the "Debugger and error tracing" section of the VisualAge for Java Help that covers these topics.

4. Export the PAO from VisualAge To top of page

Export the PAO as a jar file and attempt to test from the command line.

See Procedural Application Adaptor Development Guide topic, "Developing a PAA application".

5. Import the PAO into Object Builder To top of page

Once you have created and tested the PAO, you must import it into Object Builder and associate it with the Data Object Implementation being used by your Business Object Implementation.

See Procedural Application Adaptor Development Guide topic, "Developing a PAA application".

This information is provided by IBM Corporation

 

© Copyright IBM Corporation 1999-2000

Display Rational Unified Process using frames

Rational Unified Process