tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pitre, Russell" <>
Subject RE: Tomcat 5 Clustering
Date Tue, 16 Dec 2003 20:08:27 GMT
Hi Filip-

Sorry, while being caught up in the problem statement......I forgot to
mention that I'm using Microsoft Network Load Balancing services for
load balancing and failover detection....again my apologies....

When I do pull the plug....I am redirected to the working node.......and
when I try getAttribute("myAttribute") on that same session (never
closed the browser) the session or session attribute  is no longer


-----Original Message-----
From: Filip Hanik [] 
Sent: Tuesday, December 16, 2003 2:13 PM
To: Tomcat Users List
Subject: Re: Tomcat 5 Clustering

download a load balancer or a perl balancer called "pen" (google)

the shut down one tomcat, after initial access, the system will fail

pulling the network cable without any other failure has not yet been
as a failure scenario


----- Original Message -----
From: "Pitre, Russell" <>
To: "Tomcat Users List" <>
Sent: Tuesday, December 16, 2003 10:37 AM
Subject: Tomcat 5 Clustering

Hello All:

Please excuse my ignorance, I'm trying to achieve clustering with Tomcat
5....I've read the following in the Tomcat 5 documentation:


To run session replication in your Tomcat 5 container, the following
steps should be completed:
    -->All your session attributes must implement


Okay. I've completed all the other steps (uncomment the <Cluster>
element along with the <valve>, and added the <distributable/> in
web.xml)........I'm trying to code a simple object that implements to store in a session and here it is.....

package com.shawmut.session;


public class SerializeSession implements Serializable {

            public static String testString  = "";

            public void setString(String stringValue){

                        this.testString = stringValue;


            public String getString(){

                        return this.testString;



ok.....Now I want to put this in the session.....


            if(session.getAttribute("ss")== null){

                        SerializeSession ss = new SerializeSession();

                        ss.setString("Booooooooooooooo! And I created my
session on Tomcat 1 Node");

                        session.setAttribute("ss", ss);



Whats going on here?.....I unplug the patch cord ( docs says it's a bad
idea) from one of the boxes and hit a jsp on the working node that does
the following......and the session doesn't carry over to the working


if(session.getAttribute("ss")!= null){

            SerializeSession ss2 =






Basically what I'm looking for is an example of serializing session
attributes as noted above.... Any Help here will be greatly


To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message