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
obtainable...


Russ





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

download a load balancer

balance.sourceforge.net or a perl balancer called "pen" (google)

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

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

Filip

----- Original Message -----
From: "Pitre, Russell" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
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 java.io.Serializable

========================================================================
=======



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
java.io.Serializable to store in a session and here it is.....



package com.shawmut.session;

import java.io.Serializable;



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
node....



<%

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

            SerializeSession ss2 =
(SerializeSession)session.getAttribute("ss");

%>

SESSION:<%=ss2.getString()%>



<%

}

%>







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





Russ









---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to