HPOS 4.0 technical note 3

HP Web Services for Output Server 55
Using HP Web Services for Output Server
JBoss clustering with Apache load balancer on multiple machines
# worker.node1.connection_pool_size=10 (1)
# Define Node2
# modify the host as your host IP or DNS name.
worker.node2.port=8009
worker.node2.host= node2.mydomain.com or IP address of machine 2
worker.node2.type=ajp13
worker.node2.lbfactor=1
# worker.node1.connection_pool_size=10 (1)
# Load-balancing behaviour
worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=node1,node2
# Status worker for managing load balancer
worker.status.type=status
6. In the APACHE_HOME/conf directory, create uriworkermap.properties and populate it as follows:
# Mount the Servlet context to the ajp13 worker
/HPOSGateway=loadbalancer
/HPOSGateway/*=loadbalancer
/HPOSGateway=loadbalancer
/HPOSGateway/*=loadbalancer
7. Restart the Apache server.
8. Edit the JBoss_HOME/server/node1/deploy/jboss-web.deployer/server.xml as follows:
Locate the <Engine….> element and add an attribute jvmRoute:
<Engine name="jboss.web" defaultHost="localhost" jvmRoute="node1">
.
</Engine>
The jvmRoute attribute must match the name specified in the workers.properties file.
•In the server.xml file, ensure that the AJP 1.3 Connector is uncommented, as follows:
<!-- A AJP 1.3 Connector on port 8009 -->
<Connector port="8009" address="${jboss.bind.address}"
emptySessionPath="true" enableLookups="false" redirectPort="8443"
protocol="AJP/1.3"/>
9. Repeat step 8 on machine 2, but set jvmRoute="node2".
10. Edit the
JBoss_HOME/server/all/deploy/jboss-web.deployer/META-INF/jboss-service.xml
file (replace /all with your own node name).
Locate the <attribute> element with a name of UseJK, and set its value to true as follows:
<attribute name="UseJK">true</attribute>
11. Repeat step 10 on machine 2.
12. Restart the JBoss application server on both the machines.