Chapter 8. Migrating from JBoss 239
Installing JBoss Application Server Version 7.1.1
Download the JBoss Application Server distribution from the JBoss website. We use Version
5.1.0 in our environment.
You can find detailed installation instructions for JBoss Application Server at:
To install or configure the JBoss Application Server, complete the following steps:
1. Extract the downloaded file to a suitable location. We used C:\jboss-as-7.1.1.Final as
the installation directory for our example.
2. Set the environment variables by clicking Start Control Panel System. Click
Advanced Environment Variables. Select JBOSS_HOME. This location is referred to
as <jboss_home> throughout the document. In our case, we set it as follows:
3. Add the JBoss script to your path by appending the following line to your PATH user
variable. Our PATH variable looks like:
4. Verify the installation by starting the server by running the standalone.bat command.
8.4 Migrating the Kitchensink application of the JBoss
Quickstarts distribution
The Kitchensink application is a part of the JBoss Quickstarts distribution, which is a
collection of sample applications that demonstrate how to use new features of the product.
This collection can be downloaded separately from the JBoss website. More information
about this application can be found at:
Kitchensink is a simple application that demonstrates the new features of Java EE 6. We
choose to migrate this application for the following reasons:
򐂰 It uses JPA 2.0 (Hibernate as the JPA provider) and EJB 3.1.
򐂰 It uses JSF 2.0, CDI 1.0, and Bean Validation 1.0 (Hibernate Validator as the
validation provider).
򐂰 It uses JAX-RS (a new Java API for RESTful Web Services).
򐂰 It is simple, which is ideal for demonstrating the basic features of a migration. We can
demonstrate project scope changes without getting lost in the repetitive work that large
projects might require for each module or component.
8.4.1 Migration approach
The Kitchensink application was built with non IBM development tools: Ant and Maven. In this
particular migration exercise, we also migrate the build environment to IBM Rational
Application Developer for WebSphere Software, and use the build cycle that ships with
this product.
240 WebSphere Application Server V8.5 Migration Guide
To complete the migration, complete the following steps:
1. Verify that the application works in its original destination environment. In our case, we
build, deploy, and run the application on JBoss Application Server 7.1.1 Final.
2. Import the EAR file that is built for JBoss to IBM Rational Application Developer for
WebSphere Software to create the project structure. Import the source files in to projects
created from the source distribution.
3. Check the source code and the configuration files with the Application Migration Tool.
4. Analyze and fix problems that are reported by the build environment and Application
Migration Tool.
5. Build the Kitchensink sample application using IBM Rational Application Developer for
WebSphere Software.
6. Migrate the Hibernate JPA provider to OpenJPA.
7. Deploy and test the application on an integrated WebSphere Application Server V8.5
test environment.
8.4.2 Verifying the Kitchensink sample application
The Kitchensink application does not require any additional configuration on the target JBoss
application server. The application uses the default data source that is preconfigured on the
application server, and uses default JPA and Bean validation providers.
To verify the Kitchensink sample application, complete the following steps:
1. Download the Quickstarts distribution from the following web page:
2. Extract the downloaded archive file to a suitable location. In our case, we use
C:\quickstarts. Hereafter, this location is referred to as <quickstarts_home>.
3. Open a command prompt and change to the directory that contains the sample
application code:
4. Build and deploy the sample application by running mvn clean install in the
<quickstarts_home>\kitchensink folder.
The build script terminates successfully with the message BUILD SUCCESSFUL.
5. Open another command prompt and start your JBoss Application Server Version 4.2.3 by
running <jboss_home>/bin/standalone.bat. Maven builds the project and output,
including the WAR archive, which is generated in the
<quickstarts_home>\kitchensink\target folder.
6. Copy the generated jboss-as-kitchensink.war file in the
<quickstarts_home>\kitchensink\target folder to the
<jboss_home>\standalone\deployments folder.
7. Point your browser to the following address and test the sample application by generating
a couple of contact items, using REST endpoint links to see JSON data you enter. Notice
how form validation is handled by using a bad input string (that is, a malformed email
address of phone number).

Get WebSphere Application Server V8.5 Migration Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.