Specifications
28 IBM System z Personal Development Tool: Volume 3 Additional Topics
The jython script
You can make these changes permanent by creating the following script, in ASCII, in
/u/ibmuser/jvmprop.py
5
:
###############################################################################
# Script to set JVM generic arguments to
# -Xjit:optLevel=cold,disableInterpreterProfiling
# to improve startup performance of WebSphere on zPDT images.
#
# Author: Mitch Johnson
# Organization: IBM Advanced Technical Skills
###############################################################################
import java.lang.System as sys
lineSeparator = sys.getProperty(‘line.separator’)
global AdminApp, AdminConfig
cell=AdminConfig.list(“Cell”)
node=AdminConfig.list(“Node”,cell)
serverList=AdminConfig.list(“Server”,node).split(lineSeparator)
for server in serverList:
serverName=AdminConfig.showAttribute(server,”name”)
print “Updating genericJVMArguments for server: “ + serverName
objID=AdminConfig.getid(“/Server:” + serverName + “/”)
jvmList=AdminConfig.list(“JavaVirtualMachine”,objID).split(lineSeparator)
for jvm in jvmList:
print “Updating JVM generic arguments for “ + jvm
AdminConfig.modify(jvm, [[“genericJvmArguments”,”-Xquickstart
-Xverify:none -Xjit:optLevel=cold,disableInterpreterProfiling”]] )
print AdminConfig.queryChanges()
print AdminConfig.save()
print “Changes saved”
Remember: the above script must be entered in ASCII.
During the configuration of an instance of WebSphere on z/OS the system programmer
specifies an HFS directory where the configuration files reside. We use /u/WebSphere/V6R1
in this example. The WebSphere configuration process populates this structure with the
customized configuration and symbolic links to the WebSphere product code in
/usr/lpp/zWebSphere. The jython script shown above does not connect to an active
WebSphere instance; instead, it makes changes to the configuration files relative to the
directory in which its execution begins. Therefore, our example assumes that the
configuration files are located in directory /u/WebSphere/V6R1.
Go to directory /u/WebSphere/V6R1/AppServer/bin and enter the following command:
./wsadmin.sh -conntype none -f /u/ibmuser/jvmprop.py -lan jython
5
Another convenient directory could be used; the location of the script is not critical.










