I separate 2 things:
- distributed session
- failover sessions
A distributed session means to me that you can
have more than one instance of the same session
at the same time.
The reason you mention is just a requirement for
failsafe sessions, where you always have only one
session at a given time but the server that runs
the session can change over time.
I see a trade off between the chance to loose a
session and the amount of money and work you have
to invest to reduce the chance to loose a session
(don't believe anybody who tells you you can
bring this chance to zero).
I bet that chances are good to introduce even more
painfull new errors.
Some questtion you should answer for your self:
- Are you shure that really every bit that is needed
to continue the session is saved under every circumstance?
- Are you shure that the information that is available
is consistent and you know how to procced ?
someCodeBeforeCrash
someCodeAfterCrash
How do you know that you still have to process
someCodeAfterCrash.
All solutions I know, can only handle crashes between
request but not during requests. That would require
a transactional VM where the method calls are nested
transacions. (Does anybody know such biest ?)
- Are you shure that all people that write JSP's in such a
project understand what it means to write code that works
in such environments. Don't believe anybody who claims
that such knowledge is not needed:
StringBuffer mBuffer = new StringBuffer("Hi");
session.putValue("SomeKey", mBuffer);
...
StringBuffer mBuffer = (StringBuffer) session.getValue("SomeKey");
mBuffer.append(" Nasty programmer");
Codings like that can only be handled, if the container writes back
all session objects in certain intervals. This is quite resource
hungry and not very reliable (What happens if the crash happen
between the change and the writeback?).
Connection mVar = new Connection();
session.putValue("SessionCon", mVar);
..CRASH..
Connection mVar = (Connection) session.getValue("SessionCon");
Won't work at all.
(Not that I think that such code should exist, but I've seen worse)
> -----Urspr�ngliche Nachricht-----
> Von: David Cassidy [mailto:[EMAIL PROTECTED]]
> Gesendet: Dienstag, 2. Oktober 2001 16:04
> An: [EMAIL PROTECTED]
> Betreff: Re: AW: Does Tomcat-3.2.3 supports Distributed Sessions ?
>
>
> Umm situation where you would want them
>
> in a multi server situation.....
>
> where you want to assure your boss that no he won't loose
> customers and their money.
>
> If you look at things like dynamo and weblogic they
> provide ( I know more about dynamo than weblogic)
> a comple fail over protected etc etc sessions.
> (distributed too)
>
>
>
> Ralph Einfeldt wrote:
>
> >
> >
> > Just out of interest: what is the reason for this requirement?
> >
> > I can hardly imagine a case where the benefit of distributed
> > sessions justifies the amount of work to implement them (and
> > the amount of problems you will have if you got them)
> >
> > "Be carefull what you desire, you might get it."
> >
> > > -----Urspr�ngliche Nachricht-----
> > > Von: Lomesh Contractor [mailto:[EMAIL PROTECTED]]
> > > Gesendet: Dienstag, 2. Oktober 2001 10:48
> > > An: Tomcat-User
> > > Betreff: Does Tomcat-3.2.3 supports Distributed Sessions ?
> > >
> > >
> > > Hi,
> > >
> > > I am in need of distributed session. I am using tomcat
> > > 3.2.3, but in its
> > > document, I could not find out about its support for
> > > distributed sessions.
> > >
> > > Does anybody knows, whether Tomcat-3.2.3 supports
> > > Distributed sessions
> > > across multiple web servers and Tomcat integration on each
> > > web server ?
> > >
> > > Waiting for kind reply...
> > >
> > > Lomesh.
> > >
> > >
> > >
>
>
>