Re: [Webware-discuss] __del__ equivalent webware function

2004-10-23 Thread Matt Feifarek
Did you try the __del__() function? The problem is that servlets are re-used, as Geoff mentioned. They're not destructed after they run. Even if __del__ works, it won't necessarily work the way that you want. If you just want to explicitly shut down the database connection, you'll have to wait

RE: [Webware-discuss] __del__ equivalent webware function

2004-10-23 Thread Meh Lounge
. That's why you have to put your > cleanup code in sleep() > instead of __del__(). > > - Geoff > > -Original Message- > From: Meh Lounge [mailto:[EMAIL PROTECTED] > Sent: Friday, October 22, 2004 9:46 AM > To: Geoffrey Talvola; > [EMAIL PROTECTED] >

RE: [Webware-discuss] __del__ equivalent webware function

2004-10-22 Thread Geoffrey Talvola
del__().   - Geoff -Original Message-From: Meh Lounge [mailto:[EMAIL PROTECTED]Sent: Friday, October 22, 2004 9:46 AMTo: Geoffrey Talvola; [EMAIL PROTECTED]Subject: RE: [Webware-discuss] __del__ equivalent webware function But how can I add this thing per servlet? I'm having a s

RE: [Webware-discuss] __del__ equivalent webware function

2004-10-22 Thread Meh Lounge
But how can I add this thing per servlet? I'm having a servlet (or context) that opens a DB connection when started and need to close it when it is done. Can't I add a close() function to the context/servlet? this should be changed IMHO.Geoffrey Talvola <[EMAIL PROTECTED]> wrote: Meh Lounge wrote:>

RE: [Webware-discuss] __del__ equivalent webware function

2004-10-20 Thread Geoffrey Talvola
Meh Lounge wrote: > Can anyone please provide me with such function. How > can I order webware to do thing when a servlet or when > a context is closed? You can call Application.addShutDownHandler(func) where func is any callable object. It will be called when the app server is shut down. - Geof

[Webware-discuss] __del__ equivalent webware function

2004-10-16 Thread Meh Lounge
Hi, I'm writing a webware program which uses threads. It is essential then to terminate the thread when the servlet is destroyed, this is equivalently valid for databases/files which needs to explicitly be closed after the webserver is down, and need to be up alll the time the server runs. However