16.3. Initial clustering configuration

Task: Configure Required Elements

Complete this task to configure the basic elements required for clustering using Sun Java Web Server (SJWS) and NSAPI.


  1. Disable servlet mappings

    Under Built In Servlet Mappings in the SJWS/PROFILE/config/default-web.xml file, disable the mappings for the following servlets, by commenting them out as shown:
    • default
    • invoker
    • jsp
    <!-- ==================== Built In Servlet Mappings ===================== -->
    <!-- The servlet mappings for the built in servlets defined above. -->
    <!-- The mapping for the default servlet -->
    <!-- The mapping for the invoker servlet -->
    <!-- The mapping for the JSP servlet -->
  2. Load the required modules and properties

    Append the following lines to the SJWS/PROFILE/config/magnus.conf file:
    Init fn="load-modules" funcs="jk_init,jk_service" shlib="NATIVE/lib/nsapi_redirector.so" shlib_flags="(global|now)"
    Init fn="jk_init" worker_file="/tmp/connectors/workers.properties" log_level="debug" log_file="/tmp/connectors/nsapi.log" shm_file="/tmp/connectors/jk_shm"
    These lines define the location of the nsapi_redirector.so module used by the jk_init and jk_service functions, and the location of the workers.properties file, which defines the worker nodes and their attributes.


    The lib directory in the NATIVE/lib/nsapi_redirector.so path applies only to 32-bit machines. On 64-bit machines, this directory is called lib64.