RE: Tracking active sessions over a restart?

2002-08-13 Thread Craig R. McClanahan



On Tue, 13 Aug 2002, Scott Ganyo wrote:

> Date: Tue, 13 Aug 2002 15:05:20 -0500
> From: Scott Ganyo <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: 'Tomcat Users List' <[EMAIL PROTECTED]>
> Subject: RE: Tracking active sessions over a restart?
>
> I'm using Tomcat 4.1.9 and no, I'm not seeing at all what I expect.  I have
> a class that implements HttpSessionListener, HttpSessionAttributeListener,
> and HttpSessionActivationListener and logs these events.  But I'm not
> receiving the sessionDidActivate() event just mentioned.  I can stop and
> restart Tomcat--with my session intact, but I don't receive any event
> telling me that there was a session activated.
>

Well, there's a big difference in environment ... I wasn't using
PersistentManager or any of the Store implementations in my tests (only
the StandardManager support for persisting across restarts).  So I cannot
vouch for the behavior of any of the PersistentManager based code.

> Scott
>

Craig


> P.S. Here's another weird thing: A new session is spontaneously created once
> per minute (in response to no stimulus on my part) while Tomcat is sitting
> "idle":
>
> 2002-08-13 14:48:17,373 DEBUG [Thread-4 ] Request -
> sessionCreated: org.apache.catalina.session.StandardSessionFacade@14257f
> 2002-08-13 14:48:41,928 DEBUG [FileStore] Request -
> sessionCreated: org.apache.catalina.session.StandardSessionFacade@3e75a5
> 2002-08-13 14:49:42,065 DEBUG [FileStore] Request -
> sessionCreated: org.apache.catalina.session.StandardSessionFacade@d0b0f
> 2002-08-13 14:50:42,211 DEBUG [FileStore] Request -
> sessionCreated: org.apache.catalina.session.StandardSessionFacade@30de2e
> 2002-08-13 14:51:42,247 DEBUG [FileStore] Request -
> sessionCreated: org.apache.catalina.session.StandardSessionFacade@40b8a0
>
> etc., etc...
>
> > -----Original Message-----
> > From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, August 13, 2002 2:03 PM
> > To: Tomcat Users List
> > Subject: Re: Tracking active sessions over a restart?
> >
> >
> >
> >
> > On Tue, 13 Aug 2002, Scott Ganyo wrote:
> >
> > > Date: Tue, 13 Aug 2002 13:37:32 -0500
> > > From: Scott Ganyo <[EMAIL PROTECTED]>
> > > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> > > To: "Tomcat-User (E-mail)" <[EMAIL PROTECTED]>
> > > Subject: Tracking active sessions over a restart?
> > >
> > > I'm confused over the appropriate way to track user
> > sessions across restarts
> > > of the servlet engine.  I've been using SessionListeners and
> > > AttributeListeners to track the status of user sessions in
> > my application,
> > > but I've found them to be unreliable when I restart Tomcat
> > and persistent
> > > sessions are enabled.  Is there a way to ensure that I can
> > track the correct
> > > list of active sessions regardless of restarts, etc?
> > >
> >
> > Last time I tried it with Tomcat 4.1.5 or so, this did work
> > correctly --
> > you get a sessionCreated call the very first time that the session is
> > created, and a sessionDestroyed call when it is finally invalidated or
> > timed out.  In between, you can create a
> > SessionActivationListener if you
> > also want to know when the session is swapped out and back in (either
> > because of a restart, or because your Manager implementation
> > is swapping
> > out active but idle session).
> >
> > Are you seeing something different than this?  if so, what?
> >
> > > Thanks,
> > > Scott
> > >
> >
> > Craig
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>


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




RE: Tracking active sessions over a restart?

2002-08-13 Thread Scott Ganyo

I'm using Tomcat 4.1.9 and no, I'm not seeing at all what I expect.  I have
a class that implements HttpSessionListener, HttpSessionAttributeListener,
and HttpSessionActivationListener and logs these events.  But I'm not
receiving the sessionDidActivate() event just mentioned.  I can stop and
restart Tomcat--with my session intact, but I don't receive any event
telling me that there was a session activated.

Scott

P.S. Here's another weird thing: A new session is spontaneously created once
per minute (in response to no stimulus on my part) while Tomcat is sitting
"idle":

2002-08-13 14:48:17,373 DEBUG [Thread-4 ] Request -
sessionCreated: org.apache.catalina.session.StandardSessionFacade@14257f
2002-08-13 14:48:41,928 DEBUG [FileStore] Request -
sessionCreated: org.apache.catalina.session.StandardSessionFacade@3e75a5
2002-08-13 14:49:42,065 DEBUG [FileStore] Request -
sessionCreated: org.apache.catalina.session.StandardSessionFacade@d0b0f
2002-08-13 14:50:42,211 DEBUG [FileStore] Request -
sessionCreated: org.apache.catalina.session.StandardSessionFacade@30de2e
2002-08-13 14:51:42,247 DEBUG [FileStore] Request -
sessionCreated: org.apache.catalina.session.StandardSessionFacade@40b8a0

etc., etc...

> -Original Message-
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, August 13, 2002 2:03 PM
> To: Tomcat Users List
> Subject: Re: Tracking active sessions over a restart?
> 
> 
> 
> 
> On Tue, 13 Aug 2002, Scott Ganyo wrote:
> 
> > Date: Tue, 13 Aug 2002 13:37:32 -0500
> > From: Scott Ganyo <[EMAIL PROTECTED]>
> > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> > To: "Tomcat-User (E-mail)" <[EMAIL PROTECTED]>
> > Subject: Tracking active sessions over a restart?
> >
> > I'm confused over the appropriate way to track user 
> sessions across restarts
> > of the servlet engine.  I've been using SessionListeners and
> > AttributeListeners to track the status of user sessions in 
> my application,
> > but I've found them to be unreliable when I restart Tomcat 
> and persistent
> > sessions are enabled.  Is there a way to ensure that I can 
> track the correct
> > list of active sessions regardless of restarts, etc?
> >
> 
> Last time I tried it with Tomcat 4.1.5 or so, this did work 
> correctly --
> you get a sessionCreated call the very first time that the session is
> created, and a sessionDestroyed call when it is finally invalidated or
> timed out.  In between, you can create a 
> SessionActivationListener if you
> also want to know when the session is swapped out and back in (either
> because of a restart, or because your Manager implementation 
> is swapping
> out active but idle session).
> 
> Are you seeing something different than this?  if so, what?
> 
> > Thanks,
> > Scott
> >
> 
> Craig
> 
> 
> 
> --
> To unsubscribe, e-mail:   
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>



Re: Tracking active sessions over a restart?

2002-08-13 Thread Craig R. McClanahan



On Tue, 13 Aug 2002, Scott Ganyo wrote:

> Date: Tue, 13 Aug 2002 13:37:32 -0500
> From: Scott Ganyo <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: "Tomcat-User (E-mail)" <[EMAIL PROTECTED]>
> Subject: Tracking active sessions over a restart?
>
> I'm confused over the appropriate way to track user sessions across restarts
> of the servlet engine.  I've been using SessionListeners and
> AttributeListeners to track the status of user sessions in my application,
> but I've found them to be unreliable when I restart Tomcat and persistent
> sessions are enabled.  Is there a way to ensure that I can track the correct
> list of active sessions regardless of restarts, etc?
>

Last time I tried it with Tomcat 4.1.5 or so, this did work correctly --
you get a sessionCreated call the very first time that the session is
created, and a sessionDestroyed call when it is finally invalidated or
timed out.  In between, you can create a SessionActivationListener if you
also want to know when the session is swapped out and back in (either
because of a restart, or because your Manager implementation is swapping
out active but idle session).

Are you seeing something different than this?  if so, what?

> Thanks,
> Scott
>

Craig



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




Tracking active sessions over a restart?

2002-08-13 Thread Scott Ganyo

I'm confused over the appropriate way to track user sessions across restarts
of the servlet engine.  I've been using SessionListeners and
AttributeListeners to track the status of user sessions in my application,
but I've found them to be unreliable when I restart Tomcat and persistent
sessions are enabled.  Is there a way to ensure that I can track the correct
list of active sessions regardless of restarts, etc?

Thanks,
Scott