WebLogic Cluster"

From Documentation
Line 11: Line 11:
 
</zk>
 
</zk>
 
</source>
 
</source>
 +
=Turn on ClusterSessionPath for WebLogic=
 +
[Since 5.0.8]
 +
 +
WebLogic clustering server and GAE (Google App Engine) minimize the synchronization of the session states by assuming nothing changed, if no session attribute has been modified in a HTTP request. Thus, you have to specify the following configuration in <tt>WEB-INF/zk.xml</tt> to enforce the server to synchronize the states for each Ajax request.
 +
 +
<source lang="xml">
 +
<zk>
 +
<listener>
 +
<listener-class>org.zkoss.zkplus.cluster.ClusterSessionPatch</listener-class>
 +
</listener>
 +
</zk>
 +
</source>
 +
 +
<blockquote>
 +
----
 +
Under the hub: <javadoc>org.zkoss.zkplus.cluster.ClusterSessionPatch</javadoc> is an <javadoc type="interface">org.zkoss.zk.util.ExecutionCleanup</javadoc> listener that updates an session attribute holding <javadoc type="interface">org.zkoss.zk.ui.Session</javadoc> for each request.
 +
</blockquote>
  
 
== weblogic.xml ==
 
== weblogic.xml ==

Revision as of 03:58, 29 June 2011


Before You Start

You have to configure the following setting for ZK and Weblogic.

zk.xml

<zk>
	<system-config>
		<ui-factory-class>org.zkoss.zk.ui.http.SerializableUiFactory</ui-factory-class>
	</system-config>
</zk>

Turn on ClusterSessionPath for WebLogic

[Since 5.0.8]

WebLogic clustering server and GAE (Google App Engine) minimize the synchronization of the session states by assuming nothing changed, if no session attribute has been modified in a HTTP request. Thus, you have to specify the following configuration in WEB-INF/zk.xml to enforce the server to synchronize the states for each Ajax request.

<zk>
	<listener>
		<listener-class>org.zkoss.zkplus.cluster.ClusterSessionPatch</listener-class>
	</listener>
</zk>

Under the hub: ClusterSessionPatch is an ExecutionCleanup listener that updates an session attribute holding Session for each request.

weblogic.xml

  • Add a weblogic.xml under XXX/WEB-INF folder(XXX is like ZKsandbox in the war file)

For example,

<!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web Application 8.1//EN"
 "http://www.bea.com/servers/wls810/dtd/weblogic810-web-jar.dtd">

<weblogic-web-app>
  <session-descriptor>
    <session-param>
      <param-name>PersistentStoreType</param-name>
      <param-value>replicated</param-value>
    </session-param>
  </session-descriptor>
</weblogic-web-app>

As mentioned in Weblogic's document

replicated — Same as memory, but session data is replicated across the clustered servers.

Setting up Weblogic Clusters

After those things done above, please follow the official document to set up a Weblogic Cluster Server here.

Version History

Version Date Content
     



Last Update : 2011/06/29

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.