There is also a lesser known interface javax.servlet.http.HttpSessionActivationListener which appears to handle the condition you are after.

--David

Umesh Kudtarkar wrote:

Anyone with other suggestions ?

-----Original Message-----
From: Umesh Kudtarkar [mailto:[EMAIL PROTECTED] Sent: Monday, August 07, 2006 2:23 PM
To: Tomcat Users List
Subject: RE: Re: How to call beforeSessionDestroyed of SessionListener

Hi Moises,
Actually I am not trying to call it. I am hoping as per servlet 2.4 spec
there is some mechanism of getting HttpSession before it is destroyed.
My sessionListener class checks for some session attribute and updates
some bits in database. In case of session timeout by the time
sessionDestroyed() method of SessionListener is called Session is
already destroyed. Is there any other way of getting session information
just
before it is destroyed ?

Thanks,
Umesh

-----Original Message-----
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Moises Lejter
Sent: Monday, August 07, 2006 1:53 PM
To: users@tomcat.apache.org
Subject: Re: How to call beforeSessionDestroyed of SessionListener

I am not sure what you are trying to do ... but you should never be
calling this yourself - container callbacks are Tomcat's to call. What you would do at app level is define an HttpSessionListener to be called...

Moises

"Umesh Kudtarkar" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
Hi,
I am trying to find out how to call beforeSessionDestroyed. From Tomcat
5.5 code I see following
in org.apache.catalina.session.StandardSession

 fireContainerEvent(context,
                            "beforeSessionDestroyed",
                                          listener);

But not sure how it is called. Has anyone tried this? Any suggestions?

Thanks,
Umesh





---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to