John Dickinson said:
> I've got a question about this. To be honest, it's been a while since I've
> looked at that code, and I don't remember exactly why I commented it out.
> But, just looking at the code now, it seems like a good idea to have it in
> there. The destructor is called when the app server shuts down, right? So
> shouldn't I make a call to the pooling module to allow itself to terminate
> properly? Why would you take it out completely?
>
Well, it only makes sense to call it once.  Calling it from the destructor
of the servlet may mean that it gets called several times, since the pool
may be used by more than a single servlet class, and there may be multiple
instances of each class.  It doesn't hurt anything to call it multiple
times, since it only actually does anything the first time.

I just looked at the code for the pool object, and its destructor is
calling stopExpiration(), so there is absolutely no reason to call it from
any other destructor.

-- 
Warren Smith
[EMAIL PROTECTED]


-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to