Migrating the HelloWorld Application from Sun Java System Application Server 7
to Sun Java System Application Server 8
Version 1.0
This document explains how to use the Migration Tool for Sun Java System
Application Server 8 (hereafter called the Migration Tool) to migrate the
HelloWorld application from the Sun Java System Application Server 7 source
server to the Sun Java System Application Server 8 target server. The
document also explains how to assemble, deploy, and run the sample
application on the target server.
This document contains the following sections:
Overview
Migrating the Application
Deploying and Running the Migrated Application
on the Target Server
Overview
HelloWorld Overview briefly
describes the HelloWorld sample application.
Migrating the Application
This section describes how to migrate the application from the source
server (Sun Java System Application Server 7) to the target server
(Sun Java Systems Application Server 8).
- Set the following environment variables that are used by the Migration
Tool's build scripts:
- JAVA_HOME: J2SE SDK 1.4 installation directory
- J2EE_HOME: Sun Java Systems Application Server 8 installation
directory
- ASMT_HOME: Migration Tool installation directory
- AS_HOME: bin directory of the Sun Java Systems
Application Server 8 installation
- CLASSPATH: Include any application-specific library
classes that are required for compiling the application
- Start the Migration Tool in GUI mode:
On Solaris:
<ASMT_HOME>/bin> sh asmigrate.sh -u
On Windows:
<ASMT_HOME>\bin> asmigrate -u
Invoking the Migration Tool in Command-Line
Mode explains how to run the Migration Tool in command-line mode.
- Specify the Source Application (Input) details:
- Select "Archive" and specify the file
<ASMT_HOME>/examples/S1AS_7_0/HelloWorld/HelloWorld.ear
as input to the Migration Tool.
- Select the Source Server as Sun Java System Application Server 7
from the dropdown list.
- Specify the Target Application (Output) details:
- Specify a Directory path of your choice to the location where the
migrated output application should be written. From here on, this document
will refer to this directory path as
<OUTPUT_DIR>.
- Select the Target Server from the dropdown list. Your only choice is
Sun Java Systems Application Server 8.
- Press the Migrate button.
The Migration Tool creates a directory structure that contains the expanded
archive, modified files, and generated build scripts in the output directory
that you selected.
- Change to the <OUTPUT_DIR>/Input_Archives directory
and run the appropriate build script to generate the
HelloWorld.ear file:
- On Solaris: sh build_ear.sh
- On Windows: build_ear
The build script generates the
<OUTPUT_DIR>/Input_Archives/asmtbuild/HelloWorld.ear
file.
Deploying and Running the Migrated Application on the Target Server
- Make sure that you have set the environment
variables.
- Start the Application Server.
- Deploy HelloWorld.ear, the migrated application.
- Change to the bin directory in the Application Server and run
the following asadmin command:
asadmin deploy --user username --password password
--host hostname --port adminport --type application
<OUTPUT_DIR>/Input_Archives/asmtbuild/HelloWorld.ear
Replace the variables shown in a blue font with
values appropriate for your own environment.
- Run the deployed HelloWorld application by accessing the following URL:
http://localhost:<port>/helloworld
Index
Copyright (c) 2004
Sun Microsystems, Inc. All rights reserved.