Tool Mentor: Developing Procedural Application ObjectsPurposeProcedural 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:
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. OverviewThis tool mentor is applicable when using VisualAge for Java 3.0, Enterprise Access Builder to build PAOs. Tool StepsTo build a PAO:
1. Choose the PAO type
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.
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 build the PAO, you will be using the Enterprise Access Builder feature of the IBM VisualAge for Java product.
3. Test the PAO using VisualAge for
Java
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.
Problem determination in the VisualAge for Java unit test environment can be facilitated with a knowledge of the debugger and the tracing capability.
4. Export the PAO from VisualAge
Export the PAO as a jar file and attempt to test from the command line.
5. Import the PAO into Object Builder
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.
This information is provided by IBM
Corporation
© Copyright IBM Corporation 1999-2000 |
|
Rational Unified
Process |