Hi Filip,

I am using JavaGroups-2.0.jar...is 2.0 not compatible with Tomcat 4.1.24?
Thanks for the good software and the docs
(http://www.theserverside.com/articles/article.tss?l=Tomcat) !!

Regards,
Vijay Kandy

-----Original Message-----
From: Filip Hanik (lists) [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 01, 2004 11:03 AM
To: Tomcat Users List
Subject: RE: Session replication


hi Vijay,
sorry to let you know that I don't have bandwidth to support session
replication on Tomcat 4 as it was not part of the official release

The latest code base is at
http://cvs.apache.org/~fhanik/

is that what you are using?

Filip

-----Original Message-----
From: Vijay Kandy [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 01, 2004 9:51 AM
To: 'Tomcat Users List'
Subject: Session replication


Hello,

This may seem trivial to most of you but I bet this will help learner like
me so heres my question. I use the following method to validate a http
session. I have 2 instance of Tomcat 4.1.24 + mod_jk + Apache2 that
replicate session in-memory (JavaGroups stuff). After I deliberately
shutdown one instance, I see that requests to the other instance but while
validating sessions I go to the line where I put block comments ("I get to
this line on Node 2 ...") and eventually invalidate() them. Why does
session.isNew() return true on the second instance?


private boolean isValidSession(HttpServletRequest request,
HttpServletResponse response)
{
        try
        {
                HttpSession session = request.getSession(true);
                if( ! session.isNew() )
                {
                        if( session != null )
                        {
                                Hashtable sessionStuff =
(Hashtable)session.getAttribute("someSessionStuff");

                                try
                                {
                                        // Do something with "sessionStuff"
...
                                }
                                catch(Exception exp)
                                {

session.removeAttribute("sessionStuff");
                                        session.invalidate();
                                        return false;
                                }
                        }
                        else
                        {
                                session.invalidate();
                                return false;
                        }
                }
                else
                {
                        /**************************************
                         * I get to this line on Node 2 ...
                         **************************************/
                        session.invalidate();
                        return false;
                }
        }
        catch(Exception e)
        {
                e.printStackTrace();
        }

        return true;
}

Regards,
Vijay Kandy

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.614 / Virus Database: 393 - Release Date: 3/5/2004

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.614 / Virus Database: 393 - Release Date: 3/5/2004


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