You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Umesh Kudtarkar <um...@bitpass.com> on 2006/08/07 20:39:36 UTC
How to call beforeSessionDestroyed of SessionListener
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
RE: How to call beforeSessionDestroyed of SessionListener
Posted by Umesh Kudtarkar <um...@bitpass.com>.
Thanks David. I will give it a try.
-----Original Message-----
From: David Smith [mailto:dns4@cornell.edu]
Sent: Wednesday, August 09, 2006 11:24 AM
To: Tomcat Users List
Subject: Re: How to call beforeSessionDestroyed of SessionListener
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:umesh@bitpass.com]
>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:news@sea.gmane.org] 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" <um...@bitpass.com> wrote in message
>news:96E9D60A6B76344B96FA3144BD1E79D660FCE1@winsvr.bitpass-inc.com...
>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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: How to call beforeSessionDestroyed of SessionListener
Posted by David Smith <dn...@cornell.edu>.
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:umesh@bitpass.com]
>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:news@sea.gmane.org] 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" <um...@bitpass.com> wrote in message
>news:96E9D60A6B76344B96FA3144BD1E79D660FCE1@winsvr.bitpass-inc.com...
>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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Re: How to call beforeSessionDestroyed of SessionListener
Posted by Umesh Kudtarkar <um...@bitpass.com>.
Anyone with other suggestions ?
-----Original Message-----
From: Umesh Kudtarkar [mailto:umesh@bitpass.com]
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:news@sea.gmane.org] 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" <um...@bitpass.com> wrote in message
news:96E9D60A6B76344B96FA3144BD1E79D660FCE1@winsvr.bitpass-inc.com...
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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Re: How to call beforeSessionDestroyed of SessionListener
Posted by Umesh Kudtarkar <um...@bitpass.com>.
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:news@sea.gmane.org] 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" <um...@bitpass.com> wrote in message
news:96E9D60A6B76344B96FA3144BD1E79D660FCE1@winsvr.bitpass-inc.com...
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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: How to call beforeSessionDestroyed of SessionListener
Posted by Moises Lejter <ml...@teamsoftinc.com>.
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" <um...@bitpass.com> wrote in message
news:96E9D60A6B76344B96FA3144BD1E79D660FCE1@winsvr.bitpass-inc.com...
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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org