When a servlet is deployed in a WebLogic Server cluster, the servlet's session is replicated on all the machines in the cluster by the primary server in the cluster. This ensures that all the machines in the cluster have the same session, and irrespective of the machine in the cluster servicing the client request, the client browser will get the same session state. To use servlets in a cluster, the WebLogic Server must have the HttpClusterServlet software. The requests in the cluster are forwarded in a round-robin sequence to all the WebLogic Servers in the cluster by the primary WebLogic Server. To enable the HttpSession to be replicated in the cluster, you need to modify the WebLogic Server specific deployment descriptor file weblogic.xml and add the following tag: <session-descriptor> <session-param> <param-name>PersistentStoreType</param-name> <param-value>replicated</param-value> </session-param> </session-descriptor> |