Installation guide

16.5. Configure a load-balanced cluster with NSAPI
Task: Configure a Load-balanced Cluste r with NSAPI
Complete this task to configure a load-balanced cluster consisting of two worker nodes.
Prerequisit es
Task: Configure Required Elements
SJWS is installed in one of the locations specified in the SJWS file path abbreviation in Section 1,File
Name Conventions.
1. Define t he pat hs to serve via NSAPI
Open SJWS/PROFILE/config/obj.conf and define paths that should be served through NSAPI
at the end of the default Object definition, as shown:
<Object name="default">
[...]
NameTrans fn="assign-name" from="/status" name="jknsapi"
NameTrans fn="assign-name" from="/images(|/*)" name="jknsapi"
NameTrans fn="assign-name" from="/css(|/*)" name="jknsapi"
NameTrans fn="assign-name" from="/nc(|/*)" name="jknsapi"
NameTrans fn="assign-name" from="/jmx-console(|/*)" name="jknsapi"
NameTrans fn="assign-name" from="/jkmanager/*" name="jknsapi"
</Object>
You can map the path of any application deployed on your JBoss Enterprise Platform instance in
this obj.conf file. In the example code, the /nc path is mapped to an application deployed under
the name nc.
2. Define t he worker that serves each path
Open SJWS/PROFILE/config/obj.conf and add the following jknsapi Object definition after
the default Object definition.
<Object name="jknsapi">
ObjectType fn=force-type type=text/plain
Service fn="jk_service" worker="status" path="/jkmanager(/*)"
Service fn="jk_service" worker="router"
</Object>
This jknsapi Object defines the worker nodes used to serve each path that was assigned to
name="jknsapi" in the default Object.
3. Define t he workers and t heir attributes
Create SJWS/PROFILE/config/workers.properties.
Define the list of worker nodes and each worker node's properties in this file:
Note
For an explanation of workers.properties directives, refer to Appendix A, Reference:
workers.properties
64 Chapter 16. Configuring the NSAPI connector on Solaris