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



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



Custom Realm & ClassLoader issues?

2001-12-04 Thread Scott Ganyo

Hi all,

I've written a custom Realm that I'm attempting to use for
authentication under Tomcat 4.0.  Within that class I'm using JavaSpaces
to do the messaging to the authentication service that I wrote.  Each
piece works independantly, but together they are failing.  What happens
is this:

1. Realm: Posts authentication Message to Space.
2. Auth Service: Retrieves Message, performs authentication
3. Auth Service: Posts auth response Message to Space
4. Realm: Retrieves Message

The trouble is that at the point when the Realm retrieves the Entry from
the Space (4), I get a ClassCastException when I attempt to cast it to a
Message.  I know it is a Message, though, as I can print it out and
verify it.  Thus, it seems like it is a ClassLoader issue...?

BTW: I put all Jini jars in the server/lib and my classes in the
server/classes directory so that my Realm has access to the appropriate
classes.  Would this be related?  Is there a better way?

Thanks for any suggestions,

Scott



--
To unsubscribe:   
For additional commands: 
Troubles with the list: