Chapter 7. Migrating a real-life application 83
Figure 7-1 NOVA: the main screen
7.1.2 Model assessment
The model assessment describes an application using different models that
hides the implementation detail of the application. The models give a more
generic and broader view of the application, the way it is divided into
components, and the way they interact with each other and their surroundings.
The assessment is split in two: the architecture and the component model.
Application architecture
Figure 7-2 on page 84 shows the application architectural model. The application
is deployed to a WebSphere Application Server hosted on z/OS. This is a Version
4.0.x in Version 3.5 configuration.
Conceptually, the application is simple and includes Java, CICS, DB2, and not
much else. The complexity of the application is in the number of features, the
complexity of the interfaces, and the fault tolerance and management of the
application.
84 CCF-to-J2C Architecture Migration
Figure 7-2 Architecture diagram
The Web part is developed using an IBM Web application framework originally
named Jade, but renamed to Enterprise Application Development framework for
Java (EAD4J).
Application components
Figure 7-3 on page 85 shows a simplified component diagram for the application.
Some components have been omitted for simplicity, including ResultBeans, JSP,
and other parts of the application that are not responsible for the instantiation of
objects that interact with CCF classes.
Chapter 7. Migrating a real-life application 85
Figure 7-3 Component diagram
The responsibilities of the different components are:
BaseServlet is the super class of the two servlets used in the application
(NovaLaunch and NovaControl). The servlet responsibilities are:
– Responsible for the interaction with the user’s Web browser. Transforms
the Web browser request into a command and initiates the execution of
the command.
– When the command has been executed, the result is transferred to the
JSP used to display the result.
– Manages the execution of the JSP used for the display of the result.
– The top level Error handling. If an error occurs that inhibits the completion
of the processing, an error page displays the error to the user.
86 CCF-to-J2C Architecture Migration
CommandAdapter is the interface for the commands instantiated and
executed by the Servlet. The implemented classes are responsible for:
– Validation of the input parameters transferred from the request
– Calling the correct NovaBusinessProcess class for the Service requested
– Transferring the result of the NovaBusinessProcess to a resultBean
– Setting the name of the JSP to use to display the result of the request
NovaBusinessProcess classes are singletons that contains methods for
various business logic in the application. Several NovaBusinessProcess
classes group the different sets of business logic. Their responsibilities are:
– Instantiate or retrieve the business objects necessary for the request.
– Instantiate one or more CTGCommand classes to perform the request.
– Provide the outcome in business model objects ready for inclusion into the
ResultBean.
The
CTGCommand classes are the classes that interact directly with CCF
classes. Their responsibilities are:
– Create a CICS transaction request from the business model objects
provided by the NovaBusinessProcess.
– Request the transaction through the NovaGateway.
– Transform the CICS transaction reply into the business model objects to
be used by the NovaBusinessProcess.
– Create the ECIRequest object from the byte array from the CCF classes.
The ECIRequest object contains the transaction ID and execution mode.
The CICS TG classes can be chained; for example, the
OrderReadCTGCommand class contains calls to the
OrderLineReadCTGCommand to enable the full load of an order from within
one CTGCommand class.
The
NovaRecord classes and the NovaRecordType classes are the
CCF-generated classes. They are responsible for transforming a CICS
transaction format (a byte array) into a Java object and vice versa.
The
NovaGateway class is a singleton. Its responsibilities are:
– Create a single instance of the CTG JavaGateway class with specific
parameters for the connection.
– Manage errors and faults in the interface and enable the ability to
reconnect to CICS after a communications error has occurred.
The
CTG JavaGateway provided by the CICS Transaction Gateway product is
responsible for direct communication with CICS.
Chapter 7. Migrating a real-life application 87
Interaction diagrams
The next two diagrams show the simplified interaction of the components in the
application.
The first diagram (Figure 7-4) displays the interaction from the Web browser
through the servlet and command layers to the business process component.
None of these components has interactions with classes generated from CCF.
Figure 7-4 Interaction diagram for the components not interacting with CCF classes
The second diagram (Figure 7-5 on page 88) displays the interactions of the
components using CCF-generated classes.
Get CCF-to-J2C Architecture Migration now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.