You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Dmitri Ilyin <dm...@gmx.net> on 2003/03/24 13:40:46 UTC
take over an existing HttpSession
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
Re: take over an existing HttpSession
Posted by Dmitri Ilyin <dm...@gmx.net>.
"Dan Tran" <da...@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" <dm...@gmx.net>
> To: <st...@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" <da...@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" <dm...@gmx.net>
> > > To: <st...@jakarta.apache.org>
> > > Sent: Monday, March 24, 2003 5:59 AM
> > > Subject: Re: take over an existing HttpSession
> > >
> > >
> > > >
> > > > "Stephen Smithstone" <sk...@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
Re: take over an existing HttpSession
Posted by Dan Tran <da...@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
;-)
-D
----- Original Message -----
From: "Dmitri Ilyin" <dm...@gmx.net>
To: <st...@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" <da...@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" <dm...@gmx.net>
> > To: <st...@jakarta.apache.org>
> > Sent: Monday, March 24, 2003 5:59 AM
> > Subject: Re: take over an existing HttpSession
> >
> >
> > >
> > > "Stephen Smithstone" <sk...@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
Re: take over an existing HttpSession
Posted by Dmitri Ilyin <dm...@gmx.net>.
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" <da...@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" <dm...@gmx.net>
> To: <st...@jakarta.apache.org>
> Sent: Monday, March 24, 2003 5:59 AM
> Subject: Re: take over an existing HttpSession
>
>
> >
> > "Stephen Smithstone" <sk...@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
Re: take over an existing HttpSession
Posted by Dan Tran <da...@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" <dm...@gmx.net>
To: <st...@jakarta.apache.org>
Sent: Monday, March 24, 2003 5:59 AM
Subject: Re: take over an existing HttpSession
>
> "Stephen Smithstone" <sk...@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
Re: take over an existing HttpSession
Posted by Dmitri Ilyin <dm...@gmx.net>.
"Stephen Smithstone" <sk...@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
Re: take over an existing HttpSession
Posted by Stephen Smithstone <sk...@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
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
Re: take over an existing HttpSession
Posted by Dmitri Ilyin <dm...@gmx.net>.
Hello Vic,
could you pls. explane it....
"Vic Cekvenich" <vc...@basebeans.com> schrieb im Newsbeitrag
news:b5n9s0$45p$1@localhost.localdomain...
> Read up on session fail over (based on db fail over most likely)
>
> .V
>
> 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
Re: take over an existing HttpSession
Posted by Vic Cekvenich <vc...@basebeans.com>.
Read up on session fail over (based on db fail over most likely)
.V
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