tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <Yoav.Shap...@mpi.com>
Subject RE: Way to cleanup *before* session terminates ?
Date Fri, 01 Aug 2003 18:11:00 GMT

Howdy,
You're right, and the behavior is right: the will passivate method is
not supposed to be called when the session is going to be invalidated.
You'll have to wait for tomcat 5.

Yoav Shapira
Millennium ChemInformatics


>-----Original Message-----
>From: Charlie Toohey [mailto:ctoohey@pacbell.net]
>Sent: Friday, August 01, 2003 1:49 PM
>To: Tomcat Users List
>Subject: Re: Way to cleanup *before* session terminates ?
>
>Just tried implementing HttpSessionActivationListener, and the
>sessionWillPassivate method does not get called when the session is
>invalidated. I'm using Tomcat 4.1.24.  Maybe its not suppposed to ? Per
the
>docs, this is called when the session is migrating between VMs and when
>persisting sessions, but all I've got going is a session in a single VM
>being
>created and being invalidated.
>
>
>On Thursday 31 July 2003 06:33 am, Shapira, Yoav wrote:
>> Howdy,
>> What about the HttpSessionActivationListener's sessionWillPassivate()
>> event?
>>
>> Yoav Shapira
>> Millennium ChemInformatics
>>
>> >-----Original Message-----
>>
>> From: Bill Barker [mailto:wbarker@wilshire.com]
>>
>> >Sent: Thursday, July 31, 2003 4:18 AM
>> >To: tomcat-user@jakarta.apache.org
>> >Subject: Re: Way to cleanup *before* session terminates ?
>> >
>> >Sorry Charlie (ok, I couldn't resist :), but there isn't a way to do
>>
>> this
>>
>> >in
>> >Tomcat 4.x and lower.  However, the (current draft of the)  2.4
>>
>> Servlet-
>>
>> >Spec
>> >has changed the behavior, and so in Tomcat 5.x you can define a
>> >HttpSessionListener that will get called before the session is
>>
>> invalidated.
>>
>> >"Charlie Toohey" <ctoohey@pacbell.net> wrote in message
>> >news:E19hzAt-0004vt-00@main.gmane.org...
>> >
>> >> I have been looking for a way to execute some code when a session
is
>> >> terminating due to invalidation or expiration, but before the
session
>>
>> has
>>
>> >> actually been terminated.
>> >>
>> >> I know that implementing HttpSessionBindingListener and binding my
>>
>> object
>>
>> >> into the session will allow me to execute code in my valueUnbound
>>
>> method,
>>
>> >but
>> >
>> >> the notifcation is sent after the session has been invalidatd or
>>
>> expired.
>>
>> >> But is there any way to be notified that the session is about to
>> >
>> >terminate
>> >
>> >> before it actually has been invalidated or expired ?
>> >>
>> >> - Charlie
>> >
>>
>---------------------------------------------------------------------
>> >To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>> >For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>> This e-mail, including any attachments, is a confidential business
>> communication, and may contain information that is confidential,
>> proprietary and/or privileged.  This e-mail is intended only for the
>> individual(s) to whom it is addressed, and may not be saved, copied,
>> printed, disclosed or used by anyone else.  If you are not the(an)
>intended
>> recipient, please immediately delete this e-mail from your computer
>system
>> and notify the sender.  Thank you.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org




This e-mail, including any attachments, is a confidential business communication, and may
contain information that is confidential, proprietary and/or privileged.  This e-mail is intended
only for the individual(s) to whom it is addressed, and may not be saved, copied, printed,
disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately
delete this e-mail from your computer system and notify the sender.  Thank you.


Mime
View raw message