Red Hat Training

A Red Hat training course is available for Red Hat JBoss Enterprise Application Platform

Chapter 2. Prepare for Migration

2.1. Preparation Overview

In JBoss EAP 7, an effort was made to provide backward compatibility for JBoss EAP 6 applications. However, if your application uses features that were deprecated or functionality that was removed from JBoss EAP 7, you might need to make changes to your application code.

In addition, a number of things have changed in this release that might impact deployment of JBoss EAP 7 applications. It is recommended that you do some research and planning before you attempt to migrate your application.

Once you are comfortable with the feature changes, the development materials, and the tools that can assist your migration efforts, you can begin to evaluate your applications and your server configuration to determine the changes that are needed to run in JBoss EAP 7.

2.2. Review the Java EE 7 Features

Java EE 7 includes many improvements to make it easier to develop and run feature rich applications on private and public clouds. It incorporates new features and the latest standards such as HTML5, WebSocket, JSON, Batch, and Concurrency Utilities. Updates include JPA 2.1, JAX-RS 2.0, Servlet 3.1, Expression Language 3.0, JMS 2.0. JSF 2.2, EJB 3.2, CDI 1.2, and Bean Validation 1.1.

You can find more information about Java EE 7, including tutorials, on Oracle’s web site: Java EE at a Glance

2.3. Review What’s New in JBoss EAP 7

JBoss EAP 7 includes some notable upgrades and improvements over the previous release.

Java EE 7
JBoss EAP 7 is a certified implementation of Java EE 7, meeting both the Web and the Full profiles. It also includes support for the latest iterations of CDI 1.2 and Web Sockets 1.1.
Undertow
Undertow is the new lightweight, flexible, and performant web server included in JBoss EAP 7, replacing JBoss Web. Written in Java, it is designed for maximum throughput and scalability. It supports the latest web technologies, such as the new HTTP/2 standard.
Apache ActiveMQ Artemis
Apache ActiveMQ Artemis is the new JBoss EAP 7 built-in messaging provider. Based on a code donation from HornetQ, this Apache subproject provides outstanding performance based on a proven non-blocking architecture.
IronJacamar 1.2
The latest IronJacamar provides a stable and feature rich support for JCA and DataSources.
JBossWS 5
The fifth generation of JBossWS is a major leap forward, bringing new features and performance improvements to JBoss EAP 7 web services.
RESTEasy 3
JBoss EAP 7 includes the latest generation of RESTEasy. It goes beyond the standard Java EE REST APIs (JAX-RS 2.0) by providing a number of useful extensions such as JSON Web Encryption, Jackson, JSON-P, and Jettison.
OpenJDK ORB
JBoss EAP 7 replaced the JacORB IIOP implementation with a downstream branch of the OpenJDK ORB, leading to better interoperability with the JVM ORB and the Java EE RI.
Feature Rich Clustering
Clustering support was heavily refactored in JBoss EAP 7 and includes several public APIs for access by applications.
Port Reduction
By utilizing HTTP upgrade, JBoss EAP 7 has moved nearly all of its protocols to be multiplexed over just two HTTP ports: a management port (9990), and an application port (8080).
Enhanced Logging
The management API now supports the ability to list and view the available log files on a server, or even define custom formatters other than the default pattern formatter. Deployment’s logging setup is also greatly enhanced.

For a complete list of new features, see New Features and Enhancements in the JBoss EAP 7 Release Notes.

2.4. Review The List of Deprecated and Unsupported Features

Before you migrate your application, be aware that some features that were available in previous releases of JBoss EAP might be deprecated or no longer supported.

Support for some technologies was removed due to the high maintenance cost, low community interest, and much better alternative solutions. The following is a short summary of some of the unsupported features.

EJB Entity Beans
EJB entity beans are no longer supported. If your application uses EJB entity beans, you should migrate the code to use JPA, which offers a much more performant and flexible API.
JAX-RPC
Because JAX-WS offers a much more accurate and complete solution, code written for JAX-RPC should be migrated to use JAX-WS.
JSR-88
Java EE Application Deployment API specification (JSR-88), which defined a contract to enable tools from multiple providers to configure and deploy applications on any Java EE platform product, was not widely adopted. You must use another JBoss EAP supported option for application deployment, such as the management console, the management CLI, deployment scanner, or Maven.
Generic JMS Resource Adapter
The ability to configure a generic JMS resource adapter to connect to a JMS provider is no longer supported in JBoss EAP 7.

For a comprehensive list of deprecated and unsupported features, see Unsupported and Deprecated Functionality in the JBoss EAP 7 Release Notes.

2.5. Review the JBoss EAP Getting Started Material

Be sure to review the JBoss EAP Getting Started Guide. It contains the following important information:

  • How to download and install JBoss EAP 7
  • How to download and install Red Hat JBoss Developer Studio
  • How to configure Maven for your development environment, manage project dependencies, and configure your projects to use the JBoss EAP Bill of Material (BOM) artifacts
  • How to download and run the quickstart example applications that ship with the product

2.6. Migration Analysis and Planning

Each application and server configuration is unique and you must thoroughly understand the components and architecture of the existing application and server platform before you attempt the migration. Your migration plan should include a detailed roadmap for testing and roll out to production that takes into account the following information.

Identify the People Responsible for the Migration
Identify the stakeholders, project managers, developers, administrators, and others who will be responsible for the migration.
Review the Application Server Platform Configuration and Hardware

Examine the existing application server and platform configuration to determine how they are impacted by feature changes in JBoss EAP 7. The review should include the following items.

  • Operating systems and versions
  • Database used by the applications
  • Web servers
  • Security architecture
  • Number and type of processors
  • Amount of memory
  • Amount of physical disk storage
  • Migration of database or messaging data
  • Other components that might be impacted by the migration
Review the Current Production Environment

You should plan to recreate the production environment as closely as possible for testing and staging the migration process.

  • Take into account any clustering configurations. See Upgrading a Cluster in the JBoss EAP Patching and Upgrading Guide for more information about how to migrate clusters.
  • If you are currently running a large managed domain, consider a gradual migration approach.
  • Determine whether you need to migrate any database or messaging data.
Examine and Understand the Existing Application

Thoroughly examine the existing JBoss EAP 6 application. Be totally familiar with its architecture, functions, features and components, including:

  • The JVM version
  • Integration with other Red Hat application server middleware components
  • Integration with proprietary third-party software
  • Use of deprecated features that will require replacement
  • Application configuration including deployment descriptors, JNDI, persistence, JDBC configuration and pooling, JMS topics and queues, and logging

Identify any code or configuration incompatibilities that will require modification during the migration to JBoss EAP 7.

Create a Detailed Test Plan
  • The plan should include regression testing and acceptance criteria requirements.
  • It should also include performance testing.
  • Set up a staging environment as close to the production environment as possible to test the migration before the rollout to production.
  • Be sure to create a backup and backout plan!
Review the Resources Available for the Migration Process
  • Assess the skills of the development team and plan for training or additional consulting help.
  • Be aware that additional hardware and other resources will be required for staging and testing during the migration process until the effort is completed.
  • Determine whether any formal training is needed. If so, add it to the schedule.
Execute the Plan
Gather the necessary resources and implement the migration plan.
Important

Before making any modifications to your application, be sure to create a backup copy.

2.7. Back Up Important Data and Review Server State

Before you migrate your application, you need to be aware of the following potential issues.

  • The migration might remove temporary folders. Any deployments stored in the data/content/ directory must be backed up prior to the migration and restored after it completes. Otherwise, the server will fail to start due to the missing content.
  • Prior to the migration, handle any open transactions and delete the data/tx-object-store/ transaction directory.
  • The persistent timer data in data/timer-service-data must be checked to determine whether it is compatible. Prior to the migration, review the deployment-* files in that directory to determine which timers are still in use.

Be sure to also back up the current server configuration and applications before you begin.

2.8. Migrating an RPM Installation

Important

It is not supported to have more than one RPM-installed instance of JBoss EAP on a single Red Hat Enterprise Linux Server. As a result, we recommend that you migrate your JBoss EAP installation to a new machine when migrating to JBoss EAP 7.

When migrating a JBoss EAP RPM installation from JBoss EAP 6 to JBoss EAP 7, ensure that JBoss EAP 7 is installed on a machine that does not have an existing JBoss EAP RPM installation.

To install JBoss EAP 7 using RPMs, see the JBoss EAP Installation Guide.

The migration advice in this guide also applies to migrating RPM installations of JBoss EAP, but you might need to alter some steps (such as how to start JBoss EAP) to suit an RPM installation compared to a ZIP or installer installation.

2.9. Migrate JBoss EAP Running as a Service

If you run JBoss EAP 6 as a service, be sure to review Configuring JBoss EAP to Run as a Service in the JBoss EAP Installation Guide for updated configuration instructions for JBoss EAP 7.