Configure Your Java Environment for the Object Spawner and the JMS Access Method

Overview of Configuring Your Java Environment

For polling servers that interact with JMS queue managers, you must configure the Java environment for the object spawner and for the JMS access method.

Add the JAR Files for Your JMS Provider to Your CLASSPATH= Environment Variable

The JAR files for your JMS provider must be included in your CLASSPATH= environment variable.
For more information about this step, see the documentation for your JMS provider.
For z/OS, specify your classpath in the tkmvsenv_usermods.cfg file in the /Levn/ObjectSpawner subdirectory of your SAS configuration directory. Add the following command:
SET TKJNI_OPT_CLASSPATH=JAR-files-list

Specify the JRE Options for the Object Spawner (Second Maintenance Release of SAS 9.3 and Later)

The object spawner that launches your polling server must specify JRE options as part of its start-up command. To specify the JRE options:
  1. Edit the object spawner user modifications file, ObjectSpawner_usermods.bat (or ObjectSpawner_usermods.sh on UNIX or z/OS).
    The object spawner user modifications file should be located in the /Levn/ObjectSpawner subdirectory of your SAS configuration directory.
  2. Uncomment the line of the script that defines the JREOPTIONS parameter.
  3. If your JMS provider requires native libraries, add the following property to the JREOPTIONS in your ObjectSpawner_usermods file:
    -Djava.library.path=path-to-libraries
    The value for the -Djava.library.path= parameter should specify the path where your native libraries are located.
    For example, if you use the WebSphere MQ JMS provider and the connection factory uses the bindings transport, then the provider will need to load the mqjbnd library. On Windows, your library path parameter might be similar to the following:
    -Djava.library.path=c:\program files\ibm\websphere mq\java\lib
  4. For z/OS, if your object spawner runs as a started task, copy the –jreoptions parameter from your ObjectSpawner_usermods.sh file into the objectspawner.parm file.
    objectspawner.parm is located in the /Levn/ObjectSpawner subdirectory of your SAS configuration directory.
    Also, change the region size in the JCL of your started task to 1024M.
  5. For Windows, update the object spawner service by using the following command:
    ObjectSpawner.bat -reinstall
    For UNIX and z/OS, restart the object spawner. For details about restarting the object spawner, see the SAS Intelligence Platform: Application Server Administration Guide.

Specify the JRE Options for the Object Spawner (Before the Second Maintenance Release of SAS 9.3 )

The object spawner that launches your polling server must specify JRE options as part of its start-up command. To specify the JRE options:
  1. Obtain the JRE options from SAS by using the following code in a SAS session:
    filename f 'ObjectSpawner_usermods.bat' lrecl=32767;
    data _null_;
         length usermods $32767;
         file f;
         usermods = "-jreoptions " || '"' || getoption('jreoptions') || '"';
         if ( "&sysscp" = 'WIN' ) then
             usermods = 'Set USERMODS=' || usermods;
         else
             usermods = "USERMODS='" || trim(usermods) || "'";
         put usermods;
    run;
  2. Copy the ObjectSpawner_usermods.bat file to the directory where your object spawner start-up script is located.
    The object spawner start-up script should be located in the /Levn/ObjectSpawner subdirectory of your SAS configuration directory.
  3. For UNIX and z/OS, rename the file to ObjectSpawner_usermods.sh.
  4. If your JMS provider requires native libraries, add the following property to the JREOPTIONS in your ObjectSpawner_usermods file:
    -Djava.library.path=path-to-libraries
    The value for the -Djava.library.path= parameter should specify the path where your native libraries are located.
    For example, if you use the WebSphere MQ JMS provider and the connection factory uses the bindings transport, then the provider will need to load the mqjbnd library. On Windows, your library path parameter might be similar to the following:
    -Djava.library.path=c:\program files\ibm\websphere mq\java\lib
  5. Edit your object spawner start-up script:
    Note: For z/OS, if your spawner runs as a started task, then skip to step 6.
    1. After the call to the level_env script, add a call to the ObjectSpawner_usermods file.
      For example, in Windows add the command
      call ObjectSpawner_usermods.bat
      In UNIX or z/OS, add the command
      . ObjectSpawner_usermods.sh
    2. In the declaration for the CMD_OPTIONS variable, add a reference to the USERMODS environment variable.
      For example, in Windows add "%USERMODS%" to the set CMD_OPTIONS= command.
      In UNIX or z/OS, add "${USERMODS}" to the CMD_OPTIONS= command.
    3. For UNIX and z/OS, add eval to the start of the spawner invocation command, escape all of the quotation mark characters in the command, and then enclose the entire command after eval in double quotation marks.
      For example:
      eval "nohup $COMMAND $CMD_OPTIONS -sasSpawnerCn \"$SPWNNAME\" < ... >"
    Note: If you apply a SAS maintenance release, then you might need to repeat the changes to your object spawner start-up script.
  6. For z/OS, if your object spawner runs as a started task, copy the –jreoptions parameter from your ObjectSpawner_usermods.sh file into the objectspawner.parm file.
    objectspawner.parm is located in the /Levn/ObjectSpawner subdirectory of your SAS configuration directory.

Set RACF Program Control for the JPROXY Load Module (z/OS Only)

On z/OS, the object spawner requires that the JPROXY load module have RACF program control when the spawner uses an identity other than its own to start a server. The location of the JPROXY load module is specified by the TKJNI_OPT_PROXYPATH record in your TKMVSENV data set.
For details about the TKMVSENV data set, see SAS Companion for z/OS. For details about setting RACF program control for a load module, see the z/OS Security Server RACF Security Administrator’s Guide at publibz.boulder.ibm.com/epubs/pdf/ichza780.pdf.