struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Johan Wasserman" <Johan.Wasser...@mgxgroup.com>
Subject RE: take over an existing HttpSession
Date Fri, 28 Mar 2003 08:57:07 GMT
You might have found your solution already, but I just got the same type
of requirement.  I found, and is looking at, the
org.apache.catalina.session.PersistentManagerBase class (in
catalina.jar) and hopefully this will do the trick for me.  Also look at
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/manager.html on
how to set up the manager and state store.  I'm thinking in the lines of
saving the session ID in the user's logon database. So if the user logs
on to another terminal and he already has an session id, then I'll try
to use the state store to retrieve the old session and loading its
contents into the new session before invalidating the old one.

If anyone has worked with the PersistentManagerBase before, helpful
hints will be appreciated.

Happy coding.
Johan Wasserman

-----Original Message-----
From: Dmitri Ilyin [mailto:dmitri.ilyin@gmx.net] 
Sent: 24 March 2003 20:01
To: struts-user@jakarta.apache.org
Subject: Re: take over an existing HttpSession


"Dan Tran" <danttran@hotmail.com> schrieb im Newsbeitrag
news:OE37wsXZZTHfyQgeDKv00006c40@hotmail.com...
> With this  design idea, I am sure you will need to place a collection
to
> store all active sessions. Vector collection type will to do job to
protect
> multi threaded situation.
>
> You will  need a SessionListener to remove the expired session from
servlet
> context.
>
> You will need to know what to copy from old session to new session.
This
is
> the hardest one I beleive since struts do lots of this stuff behind
the
> scene, you may need to know struts code to do this work.
>
> Are you sure you want to do this? sound like a mantainent nightmare
for me
> ;-)
Sure I don't. But i probably must ...
I'm not using Struts a lot, so the last issue must not be critical for
me.
My application will be ported to Struts later and then i will have to
see if
it will also work for Struts but later....

>
> -D
> ----- Original Message -----
> From: "Dmitri Ilyin" <dmitri.ilyin@gmx.net>
> To: <struts-user@jakarta.apache.org>
> Sent: Monday, March 24, 2003 9:23 AM
> Subject: Re: take over an existing HttpSession
>
>
> > Thank you Dan.
> >
> > I will try it this way. I don't see any problem with multithreading
here.
> I
> > will not change the "old" session i will invalidate it. What do you
> think??
> >
> > "Dan Tran" <danttran@hotmail.com> schrieb im Newsbeitrag
> > news:OE66vTqPKGCqyzEfjkf00002440@hotmail.com...
> > > Just an idea!!
> > >
> > > Store all your sessions's reference  in the servelt context and
when a
> new
> > > session is create, check against the session list in the servelt
> context,
> > > copy over data from old session to new session, and destroy the
old
> > session
> > >
> > > Then You have to deal with all kind of multithreaded  and
usibility
> > issues.
> > > Sound scary ;-)
> > >
> > > Good luck
> > >
> > > ----- Original Message -----
> > > From: "Dmitri Ilyin" <dmitri.ilyin@gmx.net>
> > > To: <struts-user@jakarta.apache.org>
> > > Sent: Monday, March 24, 2003 5:59 AM
> > > Subject: Re: take over an existing HttpSession
> > >
> > >
> > > >
> > > > "Stephen Smithstone" <skullboxhouse@lchost.co.uk> schrieb im
> Newsbeitrag
> > > > news:200303241322.36189.skullboxhouse@lchost.co.uk...
> > > > > Use the servlet context to store the details in instead of the
> session
> > > > context
> > > > > and the label it via a the users username or something
> > > > Thank you Stephen, that's Ok but i also have to invalidate an
"old
> > > session",
> > > > so the user can only have one session at time.
> > > >
> > > > >
> > > > >
> > > > >
> > > > > On Monday 24 March 2003 12:40 pm, Dmitri Ilyin wrote:
> > > > > > Hi,
> > > > > >
> > > > > > i'm may be out of topic. But i think there are a lot of
gurus
here
> > > they
> > > > > > could help me.
> > > > > >
> > > > > > I have to implement one feature in my application for that
there
> is
> > > may
> > > > be
> > > > > > already a solution here.
> > > > > >
> > > > > > Szenario:
> > > > > > A user logged on in application. He dose some  work, dosn't
> logged
> > > out
> > > > and
> > > > > > goes to another workstation. In new workstation he logged in
> > > application
> > > > > > again with the same userID. The user must get in the
application
> an
> > > > exactly
> > > > > > the same place and have the same data from his last
workstation
> and
> > > his
> > > > > > last session must be invalidated.  So the user must take
over
his
> > last
> > > > > > session.
> > > > > >
> > > > > > any ideas??
> > > > > >
> > > > > > thanks for any advise
> > > > > >
> > > > > > regards Dmitri
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > >
---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail:
struts-user-unsubscribe@jakarta.apache.org
> > > > > > For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> > > >
> > > >
> > > >
> > > >
> > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
struts-user-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail:
struts-user-help@jakarta.apache.org
> > > >
> > > >
> >
> >
> >
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >
> >




---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message