You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Nishant Deshpande <ni...@gmail.com> on 2005/07/08 01:48:45 UTC

invalidated session

I store a bunch of objects in my session.

After the session timeout, I see the session getting invalidated (via
my listener).

Now I am expecting to see the finalizers from the objects in the
session being called - I'm pretty sure I don't have any other
references to them.

I don't see the finalizers getting called.

Am I missing something?

Thanks

Nishant

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: invalidated session

Posted by Christoph Kutzinski <ku...@gmx.de>.
Yes, you shouldn't rely on finalizers to clean-up session objects. 
Better do it in your listener.

Len Popp wrote:
> I'm pretty sure that the finalizers are only called when garbage
> collection reclaims the objects, and that will be some time after the
> session is invalidated. Possibly a very long time after, if Tomcat
> isn't busy and isn't using much memory.


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: invalidated session

Posted by Len Popp <le...@gmail.com>.
I'm pretty sure that the finalizers are only called when garbage
collection reclaims the objects, and that will be some time after the
session is invalidated. Possibly a very long time after, if Tomcat
isn't busy and isn't using much memory.
-- 
Len

On 7/7/05, Nishant Deshpande <ni...@gmail.com> wrote:
> I store a bunch of objects in my session.
> 
> After the session timeout, I see the session getting invalidated (via
> my listener).
> 
> Now I am expecting to see the finalizers from the objects in the
> session being called - I'm pretty sure I don't have any other
> references to them.
> 
> I don't see the finalizers getting called.
> 
> Am I missing something?
> 
> Thanks
> 
> Nishant
> 
> ---------------------------------------------------------------------
> 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