254 WebSphere Application Server V8.5 Migration Guide
2. After the application is deployed to the test environment, an embedded web browser is
displayed in the main docking area, presenting the entry page of the Kitchensink
application. Follow the links to test the application functionality. Things to check are form
validations and JAX-RS endpoints, which can be used for both query and
While we migrate the Kitchensink Quickstart sample application, we demonstrated the
Source migration to Rational Application Developer for WebSphere Software as a build
and test environment
Use of Application Migration Tool
Migrating from third-party JPA providers to WebSphere Open JPA built-in provider
The main points to highlight during this migration are as follows:
Libraries that ship with JBoss Application Server distributions and not with WebSphere
Application Server create more runtime dependencies that must be taken care of.
Different built-in data sources that are used in this example made it necessary to modify
the persistence settings.
JAX-RS did not need configuration changes and worked as expected.
8.5 Migrating the Online Brokerage application
Online Brokerage is the sample application from the Apache Geronimo project. This
application is used to demonstrate migration from JBoss Application Server to Geronimo
Application Server. Online Brokerage includes JBoss specific features. The version that we
choose for our example is the one that is used in the Geronimo V1.0 documentation. This
version contains the setup that is common among many JBoss users, that is, J2EE 1.4,
Hibernate (using JBoss specific HAR files), and JBoss Application Server V4.
You can download and discover more information about this application at:
We chose to migrate this application for the following reasons:
It uses the J2EE 1.4 application, which uses JSP and Hibernate.
It uses the JBoss-specific HAR archives for Hibernate.
This configuration still has a significant deployment base among JBoss users.
8.5.1 Migration approach
The Online Brokerage application is built using Apache Ant. In this particular migration
exercise, we migrate the build environment to IBM Rational Application Developer for
WebSphere Software, and use the build cycle that ships with this product. The migration is
completed by completing the following steps:
1. Build an EAR file for JBoss Application Server. Eliminate Geronimo dependencies in the
build process to build the application without installing Geronimo Application Server.
Chapter 8. Migrating from JBoss 255
2. Create a database for the application using DB2 and populate the database with data.
3. Import the EAR file that is built for JBoss to IBM Rational Application Developer for
WebSphere Software, to create the project structure. Import source files into projects that
are created from the source distribution.
4. Check the source code and configuration files with the Application Migration Tool.
5. Analyze and fix problems that are reported by the build environment.
6. Build the Online Brokerage sample application using IBM Rational Application Developer
for WebSphere Software. Deploy and test the application on the integrated WebSphere
Application Server V8.5 test environment.
8.5.2 Building the Online Brokerage application
To build the Online Brokerage application archive file, complete the following steps:
1. Download the source distribution of the application from the following website:
1. Extract the downloaded archive file to a suitable location. We choose C:\brokerage. We
refer to this location as <brokerage_home>.
2. Open the <brokerage_home>/build.properties file in an editor. Replace the line
jboss.home=E:/jboss-4.0.3SP1/server/hibernate with the line
3. In the build.properties file, replace the line dependency.dir=E:/hibernate-3.1/lib with
the line dependency.dir=<jbossV7.1.1_home>/server/default/lib. Save your changes.
4. Open the <brokerage_home>/build.xml file in an editor. Add the following line to the javac
element of the jboss-compile Ant target, among other class path elements:
Save your changes.
5. Open a command prompt, change the directory to <brokerage_home>, and run ant.
6. After the Ant build completes, the Online Brokerage application archive files are generated
8.5.3 Creating and populating the database
Because we are using an IBM DB2 database in our example, we use a slightly modified
version of database scripts that are included in sample distribution. To create and populate
the database using the dbuser database user, complete the following steps:
1. Click Start Programs IBM DB2 DB2Copy1 (default) Command Line
Tools Command Editor.
Important: We are reusing the JBoss version 7.1.1 Final installation that we use in 8.4,
“Migrating the Kitchensink application of the JBoss Quickstarts distribution” on
page 239. If you skipped that exercise, refer to that section. Also, ensure that you use
forward slashes as path separators when you edit build.properties.