Abstract
WebSphere Application Server 6.1 for i5/OS can run with Classic JVM and IBM Technology for JVM . It includes a Qshell script than can switch between JVMs. This technote discusses:
- The enableJVM script that sets a desired JVM for one or more WebSphere Application Server profiles
- An example of how to stop a profile, change the JVM, and restart the profile
For related information about this topic, refer to the following IBM Redbooks publication:
IBM Technology for Java Virtual Machine in IBM i5/OS, SG24-7353-00
Contents
Enabling 32 bit or Classic JVMs for a WebSphere profile in i5/OS
Attention: You can install WebSphere Application Server 6.1 multiple times on the same server or logical partition. To get a list of all of your installed environments, including the default profile location and install library, you can use the following script:
/QIBM/WAS/bin/queryWASinstalls
The following examples assume the default installation location.
By default, WebSphere Application Server version 6.1 uses Classic JVM for all newly created profiles. If you want to use IBM Technology for Java VM (32-bit JVM), you need to use a special Qshell script.
WebSphere Application Server version 6.1 for i5/OS includes the following i5/OS Qshell script that can switch the JVM type (if you do not use the default installation directory, you need to adjust these instructions accordingly):
/QIBM/ProdData/WebSphere/AppServer/V61/Base/bin/enableJvm
This script requires a user to have *ALLOBJ authority. The command syntax is:
enableJVM <parameters>
Here the parameters are:
- -jvm [std32 | classic]
This is a required parameter that specifies the JVM in use:
std32 = IBM Technology for JVM
classic = Classic JVM - -profile <profile_to_be_enabled>
This is an optional parameter that specifies the profile for which you enable a desired JVM.
Important: If a profile is not specified, all profiles are switched to the specified JVM.
- -verbose
This is an optional parameter that enables additional trace statements.
Quick examples
Here are several examples:
- enableJVM -jvm std32 -profile default
This sets the default profile to run on IBM Technology for JVM.
- enableJVM -jvm classic
This sets all profiles to run on Classic JVM.
- enableJVM -jvm std32 -profile default -verbose
This sets the default profile to run on IBM Technology for JVM and display additional details on the screen.
Attention: With WebSphere Application Server Network Deployment V6.1, it is possible to include servers with Classic JVM and IBM Technology for JVM in the same cell.
Complete example for enabling 32 bit JVM for an existing profile
These instructions provide a complete set of steps for switching to IBM Technology for JVM:
- Sign in to the System i platform with an appropriate user ID and password.
- Enter STRQSH on the CL command line and press Enter.
- At the Qshell prompt, run the following command (we use the default installation location):
cd /QIBM/ProdData/WebSphere/AppServer/V61/Base/bin
- If your profile is running, stop it (we use the default profile):
stopServer -profileName default
Sample output is shown in the following example:
________________________________________________________________________
QSH Command Entry$
> cd /QIBM/ProdData/WebSphere/AppServer/V61/Base/bin
$
> stopServer -profileName default
ADMU0116I: Tool information is being logged in file /QIBM/UserData/WebSphere/AppServer/V61/Base/profiles/default/logs/server1/stopServer.log
ADMU0128I: Starting tool with the default profile
ADMU3100I: Reading configuration for server: server1 ADMU3201I: Server stop request issued. Waiting for stop status. ADMU4000I: Server server1 stop completed.
===>
F3=Exit F6=Print F9=Retrieve F12=Disconnect
F13=Clear F17=Top F18=Bottom F21=CL command entry
________________________________________________________________________ - Invoke the enableJVM script to change your profile to use the IBM Technology for JVM:
enableJVM -profile default -jvm std32
This is the example of the command's output:
________________________________________________________________________ QSH Command Entry
> enableJVM -profile default -jvm std32
ADEJ0014I: Enabling profile default to use the specified JVM.
ADEJ0002I: Success: The profile will now use the specified JVM.
$
===>
F3=Exit F6=Print F9=Retrieve F12=Disconnect
F13=Clear F17=Top F18=Bottom F21=CL command entry
________________________________________________________________________ - Start the WebSphere Application Server profile that you changed earlier.
startServer -profileName default
This is the sample output from the startServer command:
________________________________________________________________________ QSH Command Entry
> startServer -profileName default
CPC1221: Job 089988/QEJBSVR/SERVER1 submitted to job queue QWASJOBQ in
library QWAS61.
CWNATV00I: Application server server1 in profile default has started and is ready to accept connections on admin port 9060.
===>
F3=Exit F6=Print F9=Retrieve F12=Disconnect
F13=Clear F17=Top F18=Bottom F21=CL command entry
________________________________________________________________________ - Your server must now run in IBM Technology for JVM.
Special Notices
This material has not been submitted to any formal IBM test and is published AS IS. It has not been the subject of rigorous review. IBM assumes no responsibility for its accuracy or completeness. The use of this information or the implementation of any of these techniques is a client responsibility and depends upon the client's ability to evaluate and integrate them into the client's operational environment.
