Chapter 7. Migrating a real-life application 97
The steps in the interaction with CICS become:
򐂰 buildResponse(). This method works mainly as in the original implementation,
A record object is instantiated and initialized with values from the business
objects. Calls buildRequest() with the created Record object as argument.
buildRequest(). Argument is the input Record object. Instantiates the
proper CommandProxy class for this interaction with CICS. Handles all
errors from the methods calls to the CommandProxy. Creates business
objects from the output Record object.
set<InputRecord>(): Sets the inputRecord object on the
execute(): Executes the transaction with CICS using managed
connections (depending on the CommandProxy setup in WSDL files)
over CICS TG.
get<OutputRecord>(): Returns the output Record object from the
Apart from these design changes, the application also must be changed with
regard to the exception handling and import statements, as described in
“Performing an automatic migration” on page 93.
The implementation details are presented in 7.3, “Manual migration of the CCF
artifacts” on page 116.
7.1.7 Migration starting point
The application was delivered to us in a zipped WSAD-IE workspace. The
workspace contained the application source files, the COBOL cpp files, the
generated CCF files, properties, and a server EAR file: everything necessary to
run and develop the application.
7.2 CMA-based migration of the CCF artifacts
The steps we perform are described in 2.1, “The migration steps” on page 12.
Based on the implementation assessment, we have identified what code
changes we need to do, which is described in “Updating the code” on page 113.
7.2.1 Preparing CCF artifacts
All CCF artifacts of the application are located in two packages: and The first one
98 CCF-to-J2C Architecture Migration
contains 246 artifacts and the second has 60 artifacts. The CMA tool requires the
CCF artifacts to be located in a JAR file.
We followed these steps to create a JAR file with the CCF artifacts:
1. Select the packages for export.
Figure 7-8 Selecting the CCF artifacts for export
Chapter 7. Migrating a real-life application 99
2. Choose the destination file and select the generated class files and resources
check box. (No Java source files and resources are needed.)
Figure 7-9 Exporting CCF artifacts
100 CCF-to-J2C Architecture Migration
3. The initial code had warnings concerning the access to static fields. Because
of this, the export was completed with warnings (Figure 7-10).
Figure 7-10 Export result

Get CCF-to-J2C Architecture Migration now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.