InfoCenter Home >
7: Multimachine management >
7.2 Managing workloads >
7.2.8 Workload management for stand-alone Java clients

7.2.8 Workload management for stand-alone Java clients

Stand-alone Java applications (Java applications that do not run under WebSphere Application Server), J2EE clients, administrative agents, and other types of Java applications can participate in WebSphere workload management. This extends the benefits of workload management (such as load balancing and failover support) to Java applications that run on machines where WebSphere Application Server is not installed. The Java client can optionally participate in WebSphere security.

Note:  These procedures have been tested only on the Windows NT platform.

Enabling workload management for a stand-alone Java client

To enable stand-alone Java applications to participate in workload management, do the following:

  1. Copy WebSphere Application Server Java Archive (JAR) files to the machine where the Java application runs.
  2. Add the names of the JAR files to the CLASSPATH environment variable on the machine where the Java application runs.
  3. Add the executable files of the supported version of the Java 2 SDK to the PATH environment variable on the machine where the Java application runs.
  4. Start the Java application, setting the appropriate Java system properties to enable workload management.

The rest of this section describes this setup procedure in more detail.

Copy the JAR files to client machine

The following JAR files must be copied from a machine where WebSphere Application Server is installed to the machine where the client application runs:

  • Copy the product_installation_root/lib/ujc.jar file to the WebSphere/jars directory.
  • Copy the _wlm_deployedBean.jar file to the WebSphere/jars directory, where _wlm_deployedBean is the name of the workload management-enabled JAR file that contains the enterprise beans being used by the Java client.
Install the SDK on the client machine

Workload management for stand-alone clients is supported for the Java 2 SDK, version IBM 1.2.2. If the machine where the client application runs is not currently using this version of the SDK, you must install it. See the SDK installation instructions for details.

Add the JAR files to the CLASSPATH variable on the client machine

Add the names of the JAR files to the CLASSPATH variable on the machine where the client application runs. For example:

CLASSPATH=D:\WebSphere\jars\_wlm_deployedBean.jar;D:\WebSphere\jars\ujc.jar;%CLASSPATH%
Add the directories containing the SDK executable files to the PATH variable on the client machine

Add the directories containing the executable files of the SDK to the PATH variable on the machine where the client application runs. For example:

PATH=C:\WebSphere\SDK\bin;C:\WebSphere\jdk\jre\bin;%PATH%
Run the client application

To enable the client application to participate in workload management, start it with the following system parameters:

  • com.ibm.ejs.wlm.BootstrapNode=admin_server_node
  • com.ibm.CORBA.BootstrapHost=admin_server_node
  • com.ibm.CORBA.BootstrapPort=900

where admin_server_node is the name of the machine where the WebSphere administrative server is located. You can specify either the short name, the IP address, or the fully qualified name of the machine. For example:

java -Dcom.ibm.ejs.wlm.BootstrapNode=greenland
-Dcom.ibm.CORBA.BootstrapHost=greenland.rh1.ibm.com
-Dcom.ibm.CORBA.BootstrapPort=900 WlmApp

Enabling workload management and security for a stand-alone Java client

Enabling workload management with security requires additional steps to be performed:

  1. Copy the JAR files and the sas.client.props file to the machine where the Java application runs.
  2. Add the names of the JAR files to the CLASSPATH environment variable on the machine where the Java application runs.
  3. Add the executable files of the supported version of the Java 2 SDK to the PATH environment variable on the machine where the Java application runs.
  4. Enable the Java client application to access the EJB application on the machine where WebSphere Application Server is installed.
  5. Start the Java application, setting the appropriate Java system properties to enable workload management.

The rest of this section describes this setup procedure in more detail.

Copy the files to the client machine

The following files must be copied from a machine where WebSphere Application Server is installed to the machine where the client application runs:

  • Copy the product_installation_root/properties/sas.client.props file to the WebSphere/properties directory. This file contains security configuration properties.
  • Copy the product_installation_root/lib/sslight.jar file to the WebSphere/jars directory.
  • Copy the product_installation_root/lib/ujc.jar file to the WebSphere/jars directory.
  • Copy the _wlm_deployedBean.jar file to the WebSphere/jars directory, where _wlm_deployedBean is the name of the workload management-enabled JAR file that contains the enterprise beans being used by the Java client.
Install the SDK on the client machine

Workload management with security supports the same version of the SDK as workload management alone: Java 2 SDK, version IBM 1.2.2. To install it, follow the SDK installation instructions.

Add the JAR files to the CLASSPATH variable on the client machine

Add the names of the JAR files to the CLASSPATH environment variable on the machine where the client application runs. For example:

CLASSPATH=D:\WebSphere\jars\_wlm_deployedBean.jar;D:\WebSphere\jars\ujc.jar;
D:\WebSphere\jars\sslight.jar;%CLASSPATH%
Add the directories containing the SDK executable files to the PATH variable on the client machine

Add the directories containing the executable files of the SDK to the PATH variable on the machine where the client application runs. For example:

PATH=C:\WebSphere\SDK\bin;C:\WebSphere\jdk\jre\bin;%PATH%
Set up the server to enable Java client access

A WebSphere administrator must create an application that specifies which enterprise beans require authorization and security checking by using the appropriate administration console wizards. The administrator must set the security permissions for all clients of the application to allow access to the read, write, remove, create, execute, and finder methods of the enterprise beans. See article 6.6.18.1, Securing applications, for details on setting up security.

Run the client application

To enable the client application to participate in workload management, start it with the following system parameters:

  • com.ibm.CORBA.ConfigURL=file:/C:/Websphere/properties/sas.client.props
  • com.ibm.ejs.wlm.BootstrapNode=admin_server_node
  • com.ibm.CORBA.BootstrapHost=admin_server_node
  • com.ibm.CORBA.BootstrapPort=900

where admin_server_node is the name of the machine where the WebSphere administrative server is located. You can specify either the short name, the IP address, or the fully qualified name of the machine. For example:

java -Dcom.ibm.CORBA.ConfigURL=file:/C:/Websphere/properties/sas.client.props
-Dcom.ibm.ejs.wlm.BootstrapNode=greenland
-Dcom.ibm.CORBA.BootstrapHost=greenland.rh1.ibm.com
-Dcom.ibm.CORBA.BootstrapPort=900 WlmApp
Go to previous article: Run-time exceptions and failover strategies for workload management Go to next article: Redirecting servlets

 

 
Go to previous article: Run-time exceptions and failover strategies for workload management Go to next article: Redirecting servlets