Skip to main content

Web services programming tips and tricks: Legacy integration techniques for Java applications

How to reuse your legacy investments within Java applications

Scott W. Ambler, Practice Leader, Agile Development, Rational Methods Group, IBM, Software Group
Scott W. Ambler is President of Ronin International, a consulting firm specializing in object-oriented software process mentoring, architectural modeling, and Enterprise JavaBeans (EJB) development. He has authored or co-authored several books about object-oriented development, including the recently released The Object Primer 2nd Edition, which covers, in detail, the subjects summarized in this article. He can be reached at scott.ambler@ronin-intl.com and at his Web site at www.ambysoft.com.

Summary:  You can easily integrate your Java, J2EE, and EJB-based applications with existing legacy systems following one or more of the four common integration strategies described here.

Date:  16 Nov 2000
Level:  Introductory
Activity:  1870 views

Very few project teams have the benefit of being able to start from scratch, something often referred to as greenfield development. Instead, the cold, hard truth of the matter is that most Java project teams need to take into account existing legacy systems when they are developing new applications. Perhaps you need to access an existing inventory control system, a legacy customer database, or a mainframe-based security access control service. If so, then you have a legacy integration issue, often called Enterprise Application Integration (EAI) issue, on your hands. The advantage to your team is that if the legacy systems are reasonably well designed, then you can take advantage of significant amounts of existing functionality. However, if the legacy systems aren't well designed, or at least not designed with integration in mind, then you will find that your integration efforts are a significant portion of your project. This is particularly true when adequate documentation isn't available or when the owners of the legacy systems are unwilling to work with your team (never underestimate the effect of politics on your project).

There are four basic approaches to legacy integration as suggested by D.S. Linthicum in Enterprise Application Integration:

  • Data-level integration
    From the point of view of a Java application, this type of integration focuses on the access of legacy databases or files by either session beans or entity beans. It also includes access to newly developed data feeds, produced by the legacy system, for the specific purpose of data access. XML is often used for this integration technique because XML is a platform-independent approach for sharing data. The advantages of data-level integration are that it is fairly straightforward and quick to implement. The disadvantages include increased data coupling between applications, thereby increasing your maintenance burden; the inability to access important behavior such as data validation and critical business rules; and the need to write significant data cleansing/formatting code for poorly designed data.

  • Application-interface integration
    With this approach, you leverage the application programming interfaces (APIs) exposed by your applications to access both the data and the functionality encapsulated by legacy systems. The advantage of application-interface integration is that this approach is fairly standard within the industry; many packages such as SAP and PeopleSoft include C-APIs that you can access via Java Native Interface (JNI) code. The main disadvantages are that software developed within your organization rarely has a defined API; the APIs may be limited in scope and may not offer the behavior that you need (or in a manner that you need it); and APIs are often function-oriented in nature and not object-oriented.

  • Method-level integration
    With this approach, business logic is shared as a collection of shared methods, or operations that your software can invoke. For example, common operations to update customer data, to validate a credit card transaction, or to deposit money into a bank account may be made available in a common repository or reusable framework that all applications have access to. The advantages of method-level integration are that it often provides fine-grained access to common business functions; a wide range of applications (including both Java and non-Java) can access the operations; and invoking the methods is straightforward. The disadvantage is that the fine-grained nature of the common methods can make it difficult to support transactions or to support common technical services, such as security access control, without significant scaffolding in each method.

  • User interface-level integration
    This technique focuses on accessing existing applications through their user interfaces, a process called screen scraping, in which user keystrokes are simulated to implement the interaction with the legacy software. Screen scraping is a common technique used by Web-based aggregator sites, for example Vertical One, to present personalized views of financial or other types of information. The advantage is that this is a time-tested and common approach for legacy integration, one that is taken by many user interface testing tools such as IBM Rational Functional Tester or Mercury Interactive's WinRunner. The main disadvantage is that this approach can be slow: you need to wait for the legacy application to render the screen that you are scraping, and any changes to the legacy user interface necessitate changes to your integration code.

Luckily, simple legacy integration -- particularly when the legacy systems are designed with integration in mind -- can often be handled through middleware products such as Tibco Inc's ActiveEnterprise product line, IBM MQSeries product family, and Iona's iPortal Integration Server. However, when the integration effort proves to be more complex than what is handled by your organization's middleware infrastructure, you will find that you need to write your own integration code, often called "wrapper" code. Table 1 lists various options that you can apply in your Java code, describing how each technique can be used to integrate Java applications with legacy systems.


Table 1. Java technology options
TechnologyRecommended use
RMI-IIOPSynchronous, peer-to-peer access of legacy systems and services. Supports method-level EAI.
JDBCAccess legacy databases. Supports data-level EAI.
JNIWrap C-APIs to access legacy systems and services. Supports application-level, method-level, and user interface-level (via screen scraping APIs) EAI.
JMSAsynchronous, message-based communication with legacy systems and services. Supports application-level and method-level EAI.

Resources

About the author

Scott W. Ambler is President of Ronin International, a consulting firm specializing in object-oriented software process mentoring, architectural modeling, and Enterprise JavaBeans (EJB) development. He has authored or co-authored several books about object-oriented development, including the recently released The Object Primer 2nd Edition, which covers, in detail, the subjects summarized in this article. He can be reached at scott.ambler@ronin-intl.com and at his Web site at www.ambysoft.com.

Comments (Undergoing maintenance)



Trademarks  |  My developerWorks terms and conditions

Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=SOA and Web services, Java technology
ArticleID=11455
ArticleTitle=Web services programming tips and tricks: Legacy integration techniques for Java applications
publish-date=11162000
author1-email=scott_ambler@ca.ibm.com
author1-email-cc=

My developerWorks community

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere).

My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Special offers