WebSphere migrations: Migrate from JBoss v4.x to IBM WebSphere Application Server Community Edition v2.x

Leverage the support and the architecture of WebSphere® Application Server and Apache Geronimo as a superior alternative to JBoss® Application Server. This document describes resources to help you migrate applications running on JBoss to WebSphere Application Server Community Edition.

Ashish Jain, Software Engineer, IBM

Author photoAshish Jain is a Software Engineer at IBM India Software Labs in Bangalore India. He is working as Level 3 Technical Support of IBM WebSphere Application Server Community Edition. He received a Bachelors of Engineering in Computer Science from NITK Surathkal, India and joined IBM in 2005 as an ELTP.


developerWorks Contributing author
        level

14 October 2009

Also available in Chinese Spanish

Introduction

Java Enterprise Edition 5 (Java™ EE5™) is a programming platform for developing and running distributed, multitier Java applications. The developed application is run on one of the Java EE containers. Two containers implementing the same specification makes it possible to seamlessly migrate an application which has been developed for one application server to run on another application server. However there are some intricacies involved due to difference in classloader mechanism, application packaging, use of native code, deployment plans etc.

In this article we introduce the two application servers and their architectural differences and similarities. Then the Migration Articles section illustrates the steps involved in migrating an application developed for JBoss Application Server to WebSphere Application Server Community Edition (hereafter Community Edition). First, we’ll give a high level introduction to the two application servers

JBoss application server is Java Enterprise Edition 5 (Java EE5) compliant application server for application development, testing and deployment, created by Red Hat. Note that as of this date JBoss v5 has been released at jboss.org, but the RedHat JBoss v5 has not been fully released. The migration of JBoss v5 should be similar.

Community Edition is a Java Enterprise Edition 5 (Java EE5) certified application server based on Apache Geronimo. It comes pre-packaged with the following open-source components, to mention just a few:

  • Apache Derby for the default database server
  • Apache OpenJPA for the persistence engine
  • Apache OpenEJB for the EJB Container
  • Apache Tomcat for the Web Container
  • Active MQ for the messaging provider

The Geronimo kernel is the core of Geronimo, which acts as the glue to plug-in any open source components.

Some high level features of Community Edition include:

  • Java Support - IBM and Sun Java
  • Platform Support - SUSE , Ubuntu, Red Hat and Asianux Linux, AIX, Sun Solaris, Windows XP, 2003, 2008 and Vista
  • Database support - Apache Derby, IBM DB2, IBM Informix, MySQL, Oracle, Microsoft SQL Server (any JDBC compliant database can be used)
  • Messaging support - Apache ActiveMQ, WebSphere MQ
  • Directory Server Support - Apache Directory Server, IBM Tivoli Directory Server, Microsoft Active Directory Server, Open LDAP Server, Sun One Directory Server
  • Small footprint- It’s easy to get started with Community Edition—the download is only around 100 MB, so developers can easily download it and get going. Community Editions’s small size also means it’s easy to embed in a larger stack, which helps both customers and ISVs build a total solution using Community Edition.
  • Centralized configuration and control - Community Edition provides monitoring support through the administrative console. Using this feature, you can gather statistics and performance data for multiple servers and display them graphically to users.
  • Portability to WebSphere Application Server family - Your investment in WebSphere Application Server Community Edition increases in value over time as the open-source community continues to mature and innovate. Also, WebSphere Application Server Community Edition gives you access to the comprehensive and proven portfolio of WebSphere middleware products. As your needs grow over time, IBM can provide a clear path to advanced capabilities such as SOA through WebSphere Application Server configurations.
  • Liberal product license - Free to use in development, testing and deployment
  • Free 30-day trial support - Community Edition offers 30 day trial support, which can be utilized by customers to get a feel for the advantages of IBM Support.
  • Eclipse Plug-in for application development, testing and deployment
  • An open forum for all your queries and questions – You can post any of your queries to the IBM developerWorks forum for Community Edition.

Architectural differences and similarities

The following section shows the architectural diagrams for Community Edition and JBoss Application Server.

Figure 1. Architecture diagram for Community Edition
Diagram showsing Community Editiona architecture
Figure 2. Architecture diagram for JBoss Application Server
Diagram showing JBoss architecture

Table 1 describes the major differences and similarities between JBoss Application Server and Community Edition:

Table 1. JBoss and Community Edition feature comparison
Feature JBoss Community Edition
Enterprise Java Beans (EJB) Supports EJB 3.0 specification Supports EJB 3.0 specification
Java Connector Architecture (JCA) Supports JCA 1.5 specification Supports JCA 1.5 specification
Java Servlets Supports Servlets 2.5 specification Supports Servlets 2.5 specification
Java Server Pages (JSP) Supports JSP 2.1 specification Supports JSP 2.1 specification
Java Server Faces (JSF) Supports JSF 1.2 specification Supports JSF 1.2 specification
Transactions Supports XA, local and no transaction Supports XA, local and no transaction
JTA implementation Support for JTA through JBoss JTA Transaction support provided through ObjectWeb JOTM and HOWL
Connection pooling and management JBossCX framework Custom Geronimo code through Codehaus TranQL
WebContainer Apache Tomcat 6.0 Apache Tomcat 6.0.20
EJB Container JBoss own implementation Apache OpenEJB
Persistence Provider Hibernate Apache OpenJPA
EJB application Deployment Descriptor Configured in jboss.xml Configured in openejb-jar.xml
Web application deployment descriptor Configured in jboss-web.xml Configured in geronimo-web.xml
EAR application deployment descriptor Configured in jboss-app.xml Configured in geronimo-application.xml
JPA deployment descriptor Configured in persistence.xml Configured in persistence.xml

Common migration issues

This section discusses some of the most common migration issues that you might encounter.

Differences in Java EE implementations

During the migration process we have encountered problems caused by differences in how the Java EE specification is interpreted by vendors. For example a few application servers are not as strict as the WebSphere family of products in validating Java EE applications and at times deployment descriptors fail validation. Another example is use of single and double quotes in JSP which fails during compilation for WebSphere family of products.

Class loader related problems

The Java class loader is responsible for locating and loading classes. Application server class loaders are complex and so is the task of tracking down and solving these issues. Each Java EE application server uses a custom implementation of class loaders, because the Java EE specification does not currently cover class loaders. For example Community Edition has a parent-child classloader hierarchy, whereas JBoss uses a unified classloader approach.

Shared libraries

These are libraries that are made available to multiple applications or the whole server. Shared libraries are located in different places and configured differently from server to server. For example in Community Edition there are a couple of ways to configure shared libraries:

  • Within the application server directory, add a dependency to the shared library in the deployment plan.
  • Outside the application server directory, add a GBean to the deployment plan.
  • In JBoss, add an entry for the library-directory in the JBoss-specific deployment plan.

Bundled libraries

Each platform is bundled with a unique set of frameworks and libraries, for example Apache Xerces and Apache Xalan. The versions of these libraries and the class loaders are different for each platform.

Deployment descriptors

The Java EE specification does not cover all the aspects of application deployment and configuration. This is why we have vendor-specific deployment descriptors. Each application server uses a different set of files; this is because they are implemented differently and have different feature sets. As mentioned in Table 1 the names of the deployment plans used by JBoss are different from those used in Community Edition. For example, JBoss calls the Web application deployment descriptor jboss-web.xml, whereas Community Edition calls it geronimo-web.xml. There may also be considerable difference between the schema definitions that are used to validate each of the deployment plans.

Application packaging

Packaging is important from a portability and migration point of view. Each application is packaged differently. This, combined with the different class loader implementations in each application server, can potentially create problems when migrating. To avoid problems, always follow the Java EE specification, which contains specifications for application packaging. An application is usually packaged into an EAR file, which can consist of the following modules:

  • EJB

    Contains the EJB class files and deployment descriptors.

  • WAR

    Web application module containing deployment descriptors.

  • JAR

    A JAR file can contain common classes used by other modules and deployment descriptors for a Java EE application client.

  • RAR

    Resource Adapter archives is a JAR file containing resource adapters for the J2C architecture.

Use of native code

The Java platform allows the use of native code, for example written in C or C++, with the use of Java Native Interface (JNI). Using native code can potentially cause problems when migrating to a different operating system. For example an application running on Windows may use .DLL files whereas if you migrate to a Linux platform the same application may require a .SO file.

JBoss Extensions

JBoss has added JBoss-specific server extensions (JBoss Jars) to enhance some application features. These extensions would need to be resolved to their Java EE specifications.


Migration articles

The migration steps outlined in the articles listed below will help you understand the intricacies discussed above, and will help you migrate your JBoss applications to Community Edition.


Conclusion

This article explained how to migrate your code from JBoss Application Server and deploy it to WebSphere Application Server Community Edition. The sample applications provided in the migration articles highlight some of the notable differences between the two implementations.

Acknowledgement

Thanks to Ron Staerker for reviewing this material.

Resources

Learn

Get products and technologies

Discuss

Comments

developerWorks: Sign in

Required fields are indicated with an asterisk (*).


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name



The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


All information submitted is secure.

Dig deeper into WebSphere on developerWorks


static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=WebSphere, Open source
ArticleID=434995
ArticleTitle=WebSphere migrations: Migrate from JBoss v4.x to IBM WebSphere Application Server Community Edition v2.x
publish-date=10142009