Red Hat Training
A Red Hat training course is available for Red Hat JBoss Web Server
14.3. Initial Clustering Configuration
Task: Configure Initial Clustering Behavior
Complete this task to configure the basic elements required for clustering using Sun Java Web Server (SJWS) and NSAPI.
Prerequisites
- Native Zip extracted to
/tmp/connectors/jboss-ep-native-5.1/
. This path is referred to as NATIVE in this procedure. - The directory
/tmp/connectors
is used as the storage location for logs, properties files, and NSAPI locks. - SJWS is installed in one of the locations specified in the SJWS file path abbreviation in Section 1, “File Name Conventions”.
Disable servlet mappings
Under Built In Servlet Mappings in theSJWS/PROFILE/config/default-web.xml
file, disable the mappings for the following servlets, as shown in the code sample:- default
- invoker
- jsp
<!-- ==================== Built In Servlet Mappings ===================== --> <!-- The servlet mappings for the built in servlets defined above. --> <!-- The mapping for the default servlet --> <!--servlet-mapping> <servlet-name>default</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping--> <!-- The mapping for the invoker servlet --> <!--servlet-mapping> <servlet-name>invoker</servlet-name> <url-pattern>/servlet/*</url-pattern> </servlet-mapping--> <!-- The mapping for the JSP servlet --> <!--servlet-mapping> <servlet-name>jsp</servlet-name> <url-pattern>*.jsp</url-pattern> </servlet-mapping-->
Load the required modules and properties
Append the following lines to theSJWS/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 thensapi_redirector.so
module used by thejk_init
andjk_service
functions, and the location of theworkers.properties
file, which defines the worker nodes and their attributes.Note
Thelib
directory in theNATIVE/lib/nsapi_redirector.so
path applies only to 32-bit machines. On 64-bit machines, this directory is calledlib64
.