session cleanup hookup

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

session cleanup hookup

jian chen
Hi,

Does anyone know how Jetty cleans up its un-used HttpSession objects?
I imagine it would be a separate background thread that recycles the
HttpSession objects.

Also, is there a way to hookup a call back function when Jetty cleans
up an existing HttpSession object? What I am trying to achieve is, for
every logged in user, the web app will create some temporary file
keyed by the session id. And I want to clean up those temporary files
when I am sure the session is not valid anymore.

Thanks in advance,

Jian


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. <a href="http://ads.osdn.com/?ad_idt77&alloc_id492&op=click">http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
jetty-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-discuss
Reply | Threaded
Open this post in threaded view
|

Re: session cleanup hookup

Chris Haynes
 "jian chen" asked

Hi,

Does anyone know how Jetty cleans up its un-used HttpSession objects?
I imagine it would be a separate background thread that recycles the
HttpSession objects.

Also, is there a way to hookup a call back function when Jetty cleans
up an existing HttpSession object? What I am trying to achieve is, for
every logged in user, the web app will create some temporary file
keyed by the session id. And I want to clean up those temporary files
when I am sure the session is not valid anymore.

Thanks in advance,

Jian


Use the HttpSessionBindingListener and HttpSessionBindingEvent classes in the
standard Sun API. Jetty will then do it all automagically for you.

Chris




-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
jetty-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-discuss
Reply | Threaded
Open this post in threaded view
|

Re: session cleanup hookup

jian chen
Thanks Chris, I will try that out.

Jian

On 7/20/05, Chris Haynes <[hidden email]> wrote:

>  "jian chen" asked
>
> Hi,
>
> Does anyone know how Jetty cleans up its un-used HttpSession objects?
> I imagine it would be a separate background thread that recycles the
> HttpSession objects.
>
> Also, is there a way to hookup a call back function when Jetty cleans
> up an existing HttpSession object? What I am trying to achieve is, for
> every logged in user, the web app will create some temporary file
> keyed by the session id. And I want to clean up those temporary files
> when I am sure the session is not valid anymore.
>
> Thanks in advance,
>
> Jian
>
>
> Use the HttpSessionBindingListener and HttpSessionBindingEvent classes in the
> standard Sun API. Jetty will then do it all automagically for you.
>
> Chris
>
>
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
> from IBM. Find simple to follow Roadmaps, straightforward articles,
> informative Webcasts and more! Get everything you need to get up to
> speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
> _______________________________________________
> jetty-discuss mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/jetty-discuss
>


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. <a href="http://ads.osdn.com/?ad_idt77&alloc_id492&op=click">http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
jetty-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-discuss