13.6 Use of Adapters in RSS


At the beginning of this chapter, we discussed both data and logic adapters. The architectural transformation strategy selected for RSS requires the development of logic adapters to redirect calls to legacy program elements to the replacement logic implemented as EJBs in the modernized system. Figure 13-8 illustrates the composition of an adapter that replaces a COBOL program element with modernized logic. In broad terms, the adapter satisfies the external requirements of the program element and provides a mapping between legacy and modernized functionality.

Figure 13-8. Legacy system adapters

The adapter satisfies the external requirements of the legacy program element in the shell. The shell is written in the same programming language as the legacy system, and also supports the same calls and accepts the same parameters. The shell also extracts and formats required information so that it may be passed as parameters to a Java class, which invokes the necessary sequence of methods in the EJBs to execute the functionality. Using the adapter, functionality in the modernized system can be decomposed differently than in the legacy system. The complexity of the adapter may vary, depending on how different the modernized architecture is from the legacy architecture. The adapter must absorb these differences for the modernized system to avoid legacy constraints.

Once the Java class has invoked the necessary EJB methods, control is returned to the COBOL shell, which must now modify common storage according to the changes that would have been made by the replaced legacy program elements. Fortunately, it is not necessary for the legacy component to update the Oracle database. These modifications are made directly from the EJBs through their persistence layer.

In addition to replacing the legacy program element, the adapter also replaces all its dependent program elements. In other words, before the adapter relinquishes control to the calling program, all changes to state data controlled and to external data components ”side effects ”normally accomplished by the program element must be performed as a consequence of the call to the adapter. To some degree, the functionality and database modifications should be implemented through a logical decomposition of activity in the modernized system. However, as the EJBs have no knowledge of, or access to, common storage, the COBOL shell must make these updates on return from the Java class.

Developing the shell and adapter code is not trivial and can significantly increase the cost of modernizing. Conversely, reducing scaffolding code should reduce overall development costs. As a result, reducing the number of adapters is a driver in determining the order in which to migrate program elements.



Modernizing Legacy Systems
Modernizing Legacy Systems: Software Technologies, Engineering Processes, and Business Practices
ISBN: 0321118847
EAN: 2147483647
Year: 2003
Pages: 142

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net