Step 1: Install your web-application into the OC4J in all clusters.
First, make sure all OC4J in the cluster has the same web-application. Access these Web-Application separately to see if they do not work properly without the cluster.
Step 2: Setting you have a Web-Application to copy its status.
Modify config / global-web-applibility.xml. Add the
<-!. Tag that is defined if the application is to be clustered Clustered applications have their ServletContext and session data shared between the apps in the cluster, the values have to be either Serializable or be remote RMI-objects (implement java.rmi .Remote) host -.. The multicast host / ip to transmit and receive cluster data on The default is 230.0.0.1 id -. The id (number) of this cluster node to identify itself with in the cluster The default is based on. Local Machine IP. Port - The Port to Transmit and Receive Cluster Data on. The default is 9127. ->
Step 3: Set the cluster point.
Modify the
Step 4: Tell the background server front end Balancer's address.
In the same XML file in the previous step, add the
Step 5: Start Balancer
To run Balancer, just run java -jar loadingbalancer.jar. Among them, some parameters can be added. -debug is a useful parameter. It is recommended to join this parameter for the first time in order to debug.
Step Six: Run the background service.
Run java -jar orion.jar. You can see the background server to register to Balancer information. If you don't see it, you will explain that "multicast" may not be supported. If you want to get more debugging information, you can use:
Java -Dhttp.cluster.debug = true -dcluster.debug = true -jar orion.jar
Step 7: Test
Use the browser to access the host name and port of Balancer to see if it is operating normally. Close a background server being used, see if other servers continue to work in place of the server.
appendix
Global-web-application.xml
XML Version = "1.0"?>
Clustered Applications Have The Their ServletContext and Session Data Shared Between the apps in the cluster, the value Be Either Serializable or Be Remote Rmi-Objects (Implement Java.rmi.Remote). Host - The Multicast Host / IP To Transmit and Receive Cluster Data ON. The Default IS 230.0.0.0.1. ID - The id (Number) of this cluster node to identify itself with in the cluster. The Default Is Based on local Machine IP. Port - The Port to Transmit and Receive Cluster Data on. The default is 9127. -> orion-web-app> Default-web-site.xml XML Version = "1.0"?> -> Web.xml XML Version = "1.0"?>