NonStop Server for Java 6.0 Programmer's Reference

Configuring a Java Pathway Serverclass
The following is a brief overview of the specific Java requirements for configuring a Java program
to run as a Pathway serverclass. Complete information about the topic is available in the TS/MP
System Management Manual.
The serverclass attributes that have specific Java requirements follow. Typically, the attribute settings
would be put in a configuration file, but the examples here show setting them in the OSS
environment.
ARGLIST
The ARGLIST should appear as follows:
-Xabend,class-name[,arguments]
where [,arguments] is an optional, comma-separated list of arguments that are to be passed
to the named serverclass. For example from the OSS prompt, start a PATHMON (process monitor)
named $foo and set the ARGLIST at the PATHCOM prompt:
$gtacl -p pathcom \$foo
PATHCOM .....
=set serverclass ARGLIST -Xabend,MyClass,3000
This is similar to entering java -Xabend MyClass 3000 at an OSS shell prompt. The -Xabend
argument to the java executable causes java to abend instead of exiting with a non-zero exit
code. Pathway servers must abend rather than merely stop when a fatal error occurs, so that the
PATHMON process can restart them. MyClass is the name of the Java class to be invoked, and
"3000" is an argument to the MyClass class.
Note that, in the OSS environment, the dollar sign ($) has special meaning; therefore, the process
name $foo must be preceded by a backslash (\), the escape character.
PROCESSTYPE
Set this attribute to OSS .
ENV
Environment variables are set using the ENV serverclass attribute. For Java use, you must set the
CLASSPATH environment variable so that the Java runtime can find your classes. If you are either
using NonStop Server for Java 6.0 versions earlier than the T2766H60^ABP SPR or running java
executable in a location other than the standard location of /usr/tandem, you must set the
JREHOME environment variable to the jre directory. For a JREHOME example, the set server
command shown entered at the PATHCOM prompt follows. (However, you would typically type
these commands in a configuration file to be used with PATHCOM.)
$gtacl -p pathcom \$foo
PATHCOM .....
=set server ENV /home/lee/jdk60/java/jre
NOTE: If you are using NonStop Server for Java 6.0 version T2766H60^ABP or later, you need
not set the JREHOME variable. The standard location for all NonStop Server for Java 6.0 installations
is /usr/tandem .
PROGRAM
Set the PROGRAM attribute to the java executable. The java executable is located by default in
/usr/tandem/java/bin/. For example from the OSS prompt, start a PATHMON (process
monitor) named $foo and set the PROGRAM attribute at the PATHCOM prompt:
Configuring a Java Pathway Serverclass 35