Weblogic Authors: Yeshim Deniz, Elizabeth White, Michael Meiner, Michael Bushong, Avi Rosenthal

Related Topics: Weblogic

Weblogic: Article

Taking the Migraine Out of Migration

Taking the Migraine Out of Migration

When J2EE was still in its nascent stage, ATG took a bold step, becoming one of the first vendors to provide a similar framework for enterprises to build their applications on. Though largely based on Java, their technology did not adhere to any of the earlier J2EE specifications. It was quite cumbersome for ATG customers to keep up with the J2EE technology. As a result, many ATG customers were left with huge code bases for applications that are difficult and expensive to maintain.

A Developing Headache
One of our customers, a financial services firm running their e-commerce sites on ATG Dynamo 4.5, merged with a firm that ran their applications on BEA WebLogic 6.1. The newly formed management mandated that all business applications and e-business components be standardized to run on one platform so both businesses could share intellectual property - applications, components, and data libraries. They chose WebLogic to be the standard platform because of its rich set of features, including security, scalability, and standards-based architecture.

Their IT organization was tasked with finding a cost-effective solution for moving all business applications to WebLogic while minimizing disruption to customers. However, the business applications were updated frequently with new components and services, so the solution required moving applications quickly to ensure that all updates were captured.

Two options were considered for this task: elimination or migration.

  • Elimination: Rewrite existing ATG applications for the WebLogic platform. Since the ATG Dynamo Server is not J2EE compliant, applications written for it aren't easily portable to WebLogic 6.1. Rewriting is a reasonable solution if the application is small (e.g., less than 5,000 lines of code). However, rewriting an application can cost nearly as much as developing the original application. For sophisticated e-commerce sites that cost over $800,000 and 15-20 months to build, rewriting becomes a less reasonable choice.
  • Migration: Until recently, application migration was completed manually either by in-house developers or outside consultants. Considering that vendors often implement the J2EE specification in nonuniform ways, the process of identifying and updating proprietary code to be compatible with a new platform can be time intensive. Consequently, the advantage of migration over rewriting was only marginal at best.

    However, an automated migration tool vastly improves the process of moving applications, making migration a viable solution for enterprises seeking to standardize on a single platform. With the Cacheon Migrator (see Figure 1), automated application migration from one application server to another is possible, making the process of converting application source code faster and easier. The Cacheon Migrator automatically converts much of an application's source code. For the portion not automatically converted, it highlights problem areas and provides detailed solutions and workarounds.

    Thus migration using the Cacheon Migrator is a practical solution for extending the life of applications that need to run on a new or upgraded application server platform. As for our customer, their IT organization decided to use one application to evaluate migration as a solution for moving their applications from ATG Dynamo Server to WebLogic Server.

    A Prescription for Migration
    A four-step plan was devised to scope the size of the project, measure success, perform the conversion, and verify results.

  • Planning: We began by assessing application candidates and code changes required to maintain the runtime environment. Once the application was selected, it needed to be prepared for migration. This involved removing unused code, consolidating existing code, and identifying missing properties and segments that required rearchitecture in WebLogic 6.1. Next, WebLogic Server, the Cacheon Migrator, and other development and deployment tools required for migration were installed. Following this, it was verified that third-party libraries could run on WebLogic.
  • Analysis: Once the planning was complete, the IT organization performed compliance analysis on all libraries. Project schedules were created and resources were assigned.
  • Execution: Once resources were identified, code development was frozen so that migration of core classes and libraries could be initiated. The customer ran the ATG application source code through the Cacheon Migrator. The Cacheon Migrator converted JHTML files to JSP files, repackaged droplets and components as JavaBeans and tag libraries, and identified the usage of initial services and scheduling services within the code base as potential startup class candidates. Once the automated conversion was complete, the IT organization reviewed the migration report, which was available in both HTML and CSV formats, and manually fixed identified problem areas.
  • Validation: After the application source code was completely converted, testing commenced. This included migrating existing system test and quality assurance environments to WebLogic. Once the environments were set up, QA environment tests, functional tests, regression tests, and user acceptance tests were run. When the application passed all tests, it was moved to the production environment in stages as "branches" off the load balancer.

    Migration Pain Points
    The key issues discovered while migrating from ATG Dynamo to WebLogic can be categorized into the following buckets:

    • JHTML pages
    • ATG Nucleus
    • Custom Droplets (Dynamo Servlet Beans )
    • Form handlers
    • Relational views
    • Initial services and scheduler services
    • Servlet pipeline
    JHTML Pages
    JHTML pages, analogous to JSP in the J2EE world, are considered one of the dogged issues in ATG migration. The JHTML format predates J2EE and thus does not follow any of the JSP specifications. As a result, the syntax and workings of the tags are different. It's quite common to find JHTML pages cluttered with business logic, as there were few ways to distinguish between the presentation layer and the business layer.

    In order to migrate applications, all JHTML pages need to be converted to JSP pages on a one-to-one mapping basis. The developers responsible for the migration need to be proficient in understanding JHTML intricacies, as well as J2EE equivalents. The components and droplet instantiation code within the JHTML pages needs special attention, as they could be interdependent. The only reasonable way to identify these dependencies is by poring through the property files of the components.

    ATG Nucleus
    Nucleus is Dynamo's framework for running server applications built from JavaBean components. Nucleus is responsible for creating and initializing components within the Dynamo application server and is similar to the JNDI services within the J2EE world. A basic operation of the Nucleus is resolving component names. The framework and the design of the Nucleus, however, cannot be directly migrated onto any J2EE application server. This presents a challenge for the architects and developers trying to find the appropriate Nucleus dependencies and identify a workaround that offers the same functionality.

    Custom Droplets
    Custom Droplets, also referred to as Dynamo Servlet Beans, are commonly used as droplet tags within JHTML pages. To migrate Custom Droplets requires understanding the functionality of the droplet as well as the scope in which it is used. Custom Droplets are common within ATG Web applications.

    Form Handlers
    Form handlers within JHTML pages handle user inputs from forms. It's possible in JHTML pages to embed Java/JHTML constructs within the HTML form tags. This makes it difficult to separate the HTML code from the control logic.

    Relational Views Relational views (RVs) are data store retrieval APIs that facilitate communication between the data stores and the presentation layers. RVs, which are proprietary in their implementation, are commonly used within an application. RVs offer a means to do object-to-data mapping within ATG - roughly equivalent to CMP in J2EE.

    Initial Services and Scheduler Services
    ATG offers configurable bootstrap services used to run services at the startup of an application server. This is achieved by implementing InitialServices and scheduler APIs, and by registering the appropriate class within the application server. J2EE does not necessarily have an equivalent, thus a developer must create an equivalent within the appropriate platform.

    Servlet Pipeline
    Servlet pipeline components exert control on the request handling of pages within an application server. Servlet pipelines are often used to implement custom request handling, especially security authentication mechanisms. The J2EE specification did not provide an equivalent until the Servlet 2.3 Specification was released. Although there isn't an explicit one-to-one mapping, the functional equivalents of security realm authentication mechanisms allow a developer to achieve the same functionality as the servlet pipeline components.

    The Cacheon Migrator Remedy
    In this particular situation, the Cacheon Migrator performed the migration from ATG Dynamo 4.5.1 to BEA Weblogic 6.1. The Cacheon Migrator (see Figure 2) migrated the application source code and configuration files to the equivalent artifacts for the WebLogic platform. Given that the source application server was ATG Dynamo (pre-J2EE and many proprietary implementations), it was believed that some of the application code base might be unsalvageable.

    The application had a number of JHTML pages that were tightly integrated with content that was made available through Documentum (a content management software solution), contained customer security authentication and image server redirection, and included URL manipulation performed through servlet pipeline components. The content also incorporated droplets and relational views for functional integration to database and legacy systems, and included initial services and scheduler services for e-mail campaigns and Web log management.

    Cacheon Migrator addressed the migration of the aforementioned features in the following ways:

    JHTML Pages
    The Cacheon Migrator converted the JHTML pages to JSP pages, keeping intact all of the text formatting as well as the positioning of the current file. All importbean and droplet tags were converted into J2EE-equivalent instantiation code and tag libraries, respectively. Furthermore, the Cacheon Migrator identified dependent components within properties files and instantiated them through useBean tags. All standard ATG droplets were converted into inline Java or tag library-based tags depending on requirements.

    Additionally, to migrate custom droplets, the Cacheon Migrator was extended by writing additional rules that were used to convert droplet code into tag library-based tags or inline Java code. The Cacheon Migrator also altered the form handlers so they would function effectively within the JSP page without modification.

    Java Source Code Migration
    Identifying all areas where proprietary APIs had been used was key for successful migration. The Cacheon Migrator intelligently parsed Java files into Java object models and validated nodes for possible matches against the ATG to BEA migration rules.

    One case worth highlighting looks at the atg.servlet.DynamoServlet class, which is a custom extension of HttpServlet class. During migration, code that uses DynamoServlet classes must either be converted to the HttpServlet equivalent where applicable, or the custom methods and properties of the DynamoServlet class must be replaced with their functional equivalents. The Cacheon Migrator performed this programmatic refactoring automatically using existing rule sets. Similarly, all ATG Nucleus resolve name calls were translated into HttpServletRequest.getsession().getAttribute(beanName) calls depending on the context of usage.

    Additionally, Servlet pipeline components were converted into Servlet filter classes with appropriate APIs.

    Relational Views Migration
    The Cacheon Migrator mapped all relational view code to equivalent JDBC calls within the J2EE specifications. Additionally, it flagged issues that required manual intervention where there was no direct mapping.

    Initial service and scheduler service classes
    A warning was provided for all occurrences of initial service classes and scheduler service classes that were identified in the configuration files and the Java code base.

    The ATG application was analyzed and converted to a WebLogic deployable application. The software automatically converted 85% of the JHTML files and nearly half of the core libraries and files. The code that needed manual attention was flagged with detailed guidelines for manual intervention. Manual steps ranged from locating reference files and renaming file directories to converting logging classes and replacing queue classes. Altogether, the application was deployed on the WebLogic platform in three weeks - one week for conversion and two weeks for testing and deployment.

    Manually migrating applications can be as time-consuming and resource intensive as rewriting the applications for a new platform. However, with proper planning and the right software, migration becomes a viable solution for moving applications from legacy application servers to newer application servers.

  • More Stories By Shyam Nagarajan

    Shyam Nagarajan is a senior consultant at Cacheon, Inc., providing customers with migration solutions. Previously, he was involved in designing and developing software solutions based on ATG and BEA technologies. Before joining Cacheon, Shyam worked on developing large financial systems at Logica.

    Comments (0)

    Share your thoughts on this story.

    Add your comment
    You must be signed in to add a comment. Sign-in | Register

    In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.

    IoT & Smart Cities Stories
    René Bostic is the Technical VP of the IBM Cloud Unit in North America. Enjoying her career with IBM during the modern millennial technological era, she is an expert in cloud computing, DevOps and emerging cloud technologies such as Blockchain. Her strengths and core competencies include a proven record of accomplishments in consensus building at all levels to assess, plan, and implement enterprise and cloud computing solutions. René is a member of the Society of Women Engineers (SWE) and a m...
    DXWordEXPO New York 2018, colocated with CloudEXPO New York 2018 will be held November 11-13, 2018, in New York City and will bring together Cloud Computing, FinTech and Blockchain, Digital Transformation, Big Data, Internet of Things, DevOps, AI, Machine Learning and WebRTC to one location.
    In an era of historic innovation fueled by unprecedented access to data and technology, the low cost and risk of entering new markets has leveled the playing field for business. Today, any ambitious innovator can easily introduce a new application or product that can reinvent business models and transform the client experience. In their Day 2 Keynote at 19th Cloud Expo, Mercer Rowe, IBM Vice President of Strategic Alliances, and Raejeanne Skillern, Intel Vice President of Data Center Group and G...
    DXWorldEXPO LLC announced today that All in Mobile, a mobile app development company from Poland, will exhibit at the 22nd International CloudEXPO | DXWorldEXPO. All In Mobile is a mobile app development company from Poland. Since 2014, they maintain passion for developing mobile applications for enterprises and startups worldwide.
    Founded in 2000, Chetu Inc. is a global provider of customized software development solutions and IT staff augmentation services for software technology providers. By providing clients with unparalleled niche technology expertise and industry experience, Chetu has become the premiere long-term, back-end software development partner for start-ups, SMBs, and Fortune 500 companies. Chetu is headquartered in Plantation, Florida, with thirteen offices throughout the U.S. and abroad.
    DXWorldEXPO | CloudEXPO are the world's most influential, independent events where Cloud Computing was coined and where technology buyers and vendors meet to experience and discuss the big picture of Digital Transformation and all of the strategies, tactics, and tools they need to realize their goals. Sponsors of DXWorldEXPO | CloudEXPO benefit from unmatched branding, profile building and lead generation opportunities.
    The standardization of container runtimes and images has sparked the creation of an almost overwhelming number of new open source projects that build on and otherwise work with these specifications. Of course, there's Kubernetes, which orchestrates and manages collections of containers. It was one of the first and best-known examples of projects that make containers truly useful for production use. However, more recently, the container ecosystem has truly exploded. A service mesh like Istio addr...
    CloudEXPO New York 2018, colocated with DXWorldEXPO New York 2018 will be held November 11-13, 2018, in New York City and will bring together Cloud Computing, FinTech and Blockchain, Digital Transformation, Big Data, Internet of Things, DevOps, AI, Machine Learning and WebRTC to one location.
    @DevOpsSummit at Cloud Expo, taking place November 12-13 in New York City, NY, is co-located with 22nd international CloudEXPO | first international DXWorldEXPO and will feature technical sessions from a rock star conference faculty and the leading industry players in the world. The widespread success of cloud computing is driving the DevOps revolution in enterprise IT. Now as never before, development teams must communicate and collaborate in a dynamic, 24/7/365 environment. There is no time t...
    SYS-CON Events announced today that DatacenterDynamics has been named “Media Sponsor” of SYS-CON's 18th International Cloud Expo, which will take place on June 7–9, 2016, at the Javits Center in New York City, NY. DatacenterDynamics is a brand of DCD Group, a global B2B media and publishing company that develops products to help senior professionals in the world's most ICT dependent organizations make risk-based infrastructure and capacity decisions.