Cluster Archive

How to store http sessions in database for WebLogic Cluster

In this example we are going use Postgres database for session replication. It can be downloaded from here

Once installed, you need to execute the following query to create the table to store session


create table wl_servlet_sessions ( wl_id TEXT NOT NULL, wl_context_path TEXT NOT NULL, wl_is_new CHAR(1),
 wl_create_time NUMERIC(20),     wl_is_valid CHAR(1), wl_session_values BYTEA, wl_access_time NUMERIC(20), 
wl_max_inactive_interval INTEGER, PRIMARY KEY (wl_id, wl_context_path) );

Once the database setup is complete, we need to create a postgres datasource on Weblogic Server.
You can follow the steps here if needed.Then you need to update the deployment descriptor (weblogic.xml) of your application as follows.




Now you can log in to your application, store objects in session.

If you want to have a look at the session details in the database, you can use the pgAdmin tool.



Please feel free to get in touch with us if you have any queries.



Wonders Team

Clustering in WebSphere Application Server

Clustering is a very critical aspect of any middleware enterprise application. It provides capabilities of high availability by providing fail over and load balancing mechanism.

This post is a sample demonstration of configuring a cluster in WebSphere Application Server Network Deployment 7.0.


Deployment Manager Profile created using profile management tools.



1. Create Cluster definition.

Log into WAS Admin console — > Servers — > Clusters — > WebSphere application server clusters.

Clustering in WebSphere

Clustering in websphere

Clustering in websphere


2. Create cluster members.

Provide the details about the cluster members.

Clustering in WebSphere


Define the node on which the cluster member would reside.

Also define whether the server would be generated based on a server template.

You can add additional members to the cluster.

Clustering in WebSphere


Once the cluster is created successfully, it would be in stopped state by default.

3. Make sure the node agent is started.

Go to System administration from left panel — > Node agents — > Check the status.


Clustering in WebSphere

Clustering in WebSphere


If the Node Agent is not  started, you can execute the below script to start the same.


4. Start the cluster.




Further reading:


Some common issues while configuring a cluster in WebSphere Application Server.



Cluster member MyServer1 will not be started because the Node Agent on node Node02 is not active. Cluster members can be started individually from the cluster member collection panel.


Make sure you start the Node Agent.


The node agent on node Node02 must be started to perform the restart operation. Node agents in stopped state cannot be started from the console.


You would need to start the node agent from command line as below.





Caused by: ADMU7707E: Failed while trying to determine the Windows Service name for server: nodeagent; probable error executing WASService.exe: ADMU7709E: Unexpected exception while processing server: nodeagent; exception = Cannot run program “D:\Softwares\bin\WASService.exe”: CreateProcess error=740, The requested operation requires elevation.



Check whether the node agent service is present or not. If not create a node agent service as below.


WAS_HOME\bin> wasservice -add Dmgr01_NodeAgent

-servername server1 -profilePath “D:\Softwares\profiles\Dmgr01”

-wasHome “D:\Softwares” -logFile “D:\Softwares\profiles\Dmgr01\logs\nodeagent\startNode.log”

-logRoot “D:\Softwares\profiles\Dmgr01logs\nodeagent” -restart true -startType automatic



The node LTADKAW7Node01 is not synchronized with the master configuration. This may prevent cluster member MyServer1 from starting correctly.

Remedy: Synchronize the node.



Wonders team 🙂




HttpClusterServlet Configuration (Weblogic Server Acting as a Proxy)

To make a weblogic server act as a webserver, HttpClusterServlet is used. Below are the steps to create it:

–    Create 3 managed servers and add 2 managed servers to a cluster, let the third managed server be a standalone server

– Create 3 managed servers and add 2 managed servers to a cluster, let the third managed server be a standalone server
– Develop an application which will enable the managed server to act as a web server.
– Make a directory as D:\Apps\HttpClusterServlet in your disk which will be the directory of your application. Make a directory WEB-INF in HttpClusterServlet folder.

–    Now create web.xml inside WEB-INF and write the below in the xml file:

<?xml version=”1.0″ encoding=”UTF-8″?>

<web-app xmlns=””>







–    Now create weblogic.xml in WEB-INF and write the below in the file.

<?xml version=”1.0″ encoding=”UTF-8″?>
<weblogic-web-app xmlns=”″>

–    Now deploy the application HttpClusterServlet on the standalone server as below:

–    Now deploy your web application on the cluster as:

–    Now hit the application with the port of the ProxyMS which is 7007. Url would be something like The jsp page should appear.

If you have any questions, please let us know and we will be glad to help you.

Best Regards.

Now deploy your application on the cluster as: