ws-soap-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Nichol" <snicholn...@scottnichol.com>
Subject Re: How destroy java application using SOAP and Tomcat
Date Fri, 29 Oct 2004 13:35:52 GMT
For application scope, Apache SOAP keeps the instance of your class as part of the ServletContext
for the servlet (using setAttribute).  I would think that re-loading the Apache SOAP application
would cause the old context to be released (no more references to it) and the new one to be
created.  It then becomes a matter of garbage collection to call your finalizer.

Scott Nichol

Do not send e-mail directly to this e-mail address,
because it is filtered to accept only mail from
specific mail lists.

----- Original Message ----- 
From: "Jaroslav Šrýtr" <srytrj@seznam.cz>
To: <soap-user@ws.apache.org>
Sent: Saturday, October 23, 2004 3:52 PM
Subject: How destroy java application using SOAP and Tomcat


> Hi,
> I use Apache SOAP with Tomcat (5.0.25) and have this trouble with SOAP. I
> deployed java application. Application works right, but when is SOAP
> reloaded from Tomcat Manager, is created new instance of class (is called
> constructor), but old isn't free from a memory. It isn't call method
> finalize(). I need perform any action, when is application shutdown. It's
> possible? How are remove applications from a memory, when is SOAP reload or
> stop?
> 
> Thank,
> 
> Jarda
> 
> -----------------
> Very simple source code, which I use for testing:
> (client send SOAP request and this class (method hello) return a response)
> 
> 
> public class test
> {
> public test()
> { System.out.println("---------- Constructor ----------"); }
> 
> public String hello(String aName)
>  { return "Hello, " + aName; }
> 
> public void finalize()
>  { System.out.println("---------- Finalize method ----------"); }
> }
> 
> 

Mime
View raw message