RE: take over an existing HttpSession

2003-03-28 Thread Johan Wasserman
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:[EMAIL PROTECTED] 
Sent: 24 March 2003 20:01
To: [EMAIL PROTECTED]
Subject: Re: take over an existing HttpSession


Dan Tran [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
 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 [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 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 [EMAIL PROTECTED] schrieb im Newsbeitrag
  news:[EMAIL PROTECTED]
   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 [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Sent: Monday, March 24, 2003 5:59 AM
   Subject: Re: take over an existing HttpSession
  
  
   
Stephen Smithstone [EMAIL PROTECTED] schrieb im
 Newsbeitrag
news:[EMAIL PROTECTED]
 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:
[EMAIL PROTECTED]
  For additional commands, e-mail:
 [EMAIL PROTECTED]
   
   
   
   
  
 -
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]
 
 




-
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

take over an existing HttpSession

2003-03-24 Thread Dmitri Ilyin
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: take over an existing HttpSession

2003-03-24 Thread Stephen Smithstone
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: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


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



Re: take over an existing HttpSession

2003-03-24 Thread Dan Tran
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 [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, March 24, 2003 5:59 AM
Subject: Re: take over an existing HttpSession



 Stephen Smithstone [EMAIL PROTECTED] schrieb im Newsbeitrag
 news:[EMAIL PROTECTED]
  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: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]




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



Re: take over an existing HttpSession

2003-03-24 Thread Vic Cekvenich
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: take over an existing HttpSession

2003-03-24 Thread Dmitri Ilyin
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 [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
 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 [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, March 24, 2003 5:59 AM
 Subject: Re: take over an existing HttpSession


 
  Stephen Smithstone [EMAIL PROTECTED] schrieb im Newsbeitrag
  news:[EMAIL PROTECTED]
   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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
  -
  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]



Re: take over an existing HttpSession

2003-03-24 Thread Dmitri Ilyin
Hello Vic,

could you pls. explane it

Vic Cekvenich [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: take over an existing HttpSession

2003-03-24 Thread Dan Tran
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 [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
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 [EMAIL PROTECTED] schrieb im Newsbeitrag
 news:[EMAIL PROTECTED]
  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 [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Monday, March 24, 2003 5:59 AM
  Subject: Re: take over an existing HttpSession
 
 
  
   Stephen Smithstone [EMAIL PROTECTED] schrieb im
Newsbeitrag
   news:[EMAIL PROTECTED]
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: [EMAIL PROTECTED]
 For additional commands, e-mail:
[EMAIL PROTECTED]
  
  
  
  
   -
   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]



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



Re: take over an existing HttpSession

2003-03-24 Thread Dmitri Ilyin

Dan Tran [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
 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 [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 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 [EMAIL PROTECTED] schrieb im Newsbeitrag
  news:[EMAIL PROTECTED]
   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 [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Sent: Monday, March 24, 2003 5:59 AM
   Subject: Re: take over an existing HttpSession
  
  
   
Stephen Smithstone [EMAIL PROTECTED] schrieb im
 Newsbeitrag
news:[EMAIL PROTECTED]
 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:
[EMAIL PROTECTED]
  For additional commands, e-mail:
 [EMAIL PROTECTED]
   
   
   
   
  
 -
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]
 
 




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