>From what I understand,  you don't want persistant sessions when you restart
Tomcat, right?  i.e., you are not storing any of old sessions in ur db or a
file?  Then I think you have to implement HttpSessionBindingListener interface
for the Class you want to add to SessionListener.

I am not sure if HttpSessionActivationListener is the same thing or not.  But
from the spec, it sounds more like a persistent thing.  Stand to be corrected:)

-----Original Message-----
From: Kal Govindu [mailto:[EMAIL PROTECTED] 
Sent: August 5, 2003 11:54 AM
To: Tomcat Users List
Subject: RE: Persistent Sessions


Hi,

First, thanks to all of you.

Now, I have class which implements HttpSessionListener and
HttpSessionActivationListener. In the sessionCreated method I have the
following line to bind the current class to the session.

CODE:
        event.getSession().setAttribute(getClass().getName(), this);

My sessionDidActivate method does not seem to be invoked, I have logging
message in both the methods and I can sessionCreated being called in the
Log but not sessionDidActivate.

Please, help
Thanks
Kal




-----Original Message-----
From: Jon Wingfield [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 05, 2003 4:09 AM
To: Tomcat Users List
Subject: Re: Persistent Sessions


Your HttpSessionActivationListener must be an object bound to the
session.

So, in your HttpSessionListener's sessionCreated method add the 
HttpSessionActivationListener to the session as an attribute.

HTH,

Jon

Kal Govindu wrote:

> Hi Yoav,
> 
> Ok, now my listener class implements a HttpSessionActivationListener
and
> neither of the function;
> sessionDidActivate or sessionWillPassivate are being called. Do I need
> anything special to implement this and so that Did Activate and will
> Passivate events fire?
> 
> I am running on Tomcat4.1.12, if that matter.
> 
> Thanks
> Kal
> 
> -----Original Message-----
> From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
> Sent: Monday, August 04, 2003 2:35 PM
> To: Tomcat Users List
> Subject: RE: Persistent Sessions
> 
> 
> 
> Howdy,
> I'm sorry, I meant use an activation listener instead of the context
> listener to invalidate them.  That should work.  contextDestroyed() is
> too late as all the session handling has already happened.
> 
> Yoav Shapira
> Millennium ChemInformatics
> 
> 




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

Reply via email to