tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Question about undeploying application
Date Fri, 13 Aug 2010 19:24:09 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ivan,

On 8/13/2010 6:45 AM, Ivan Mladenović wrote:
> I define ServletContextListener (create my implementation of this listener
> and define this listener in web.xml). In method contextDestroyed I try to
> shutdown all of the schedulers in following way:
> 
> ApplicationContext context = (ApplicationContext)
> sce.getServletContext().getAttribute(WebApplicationContext.*
> ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE*);

I don't recognize the above, but I suppose you know what you are doing.

> scheduler = (StdScheduler) context.getBean("scheduler");
> 
> cbcInterfaceScheduler.shutdown(*true*);

Are these the same object? It looks like you are not shutting-down the
object you got from the context.

> Boolean parameter means: wait for jobs to complete.
> 
> I follow the logs, destroy method is called and all schedulers are shutdown.

Sounds good.

> When I try to deploy same WAR file again, following error appears in
> catalina log file:
> 
> Aug 13, 2010 12:22:54 PM org.apache.catalina.loader.WebappClassLoader
> clearReferencesThreads
> 
> SEVERE: The web application [] appears to have started a thread named
> [scheduler_Worker-8] but has failed to stop it. This is very likely to
> create a memory leak.

Could that be the old version of the webapp? Try a completely clean
deployment, then re-deploy and see what happens.

> Aug 13, 2010 12:22:54 PM org.apache.catalina.loader.WebappClassLoader
> clearReferencesThreads
> 
> SEVERE: The web application [] appears to have started a thread named
> [Thread-32] but has failed to stop it. This is very likely to create a
> memory leak.

This is likely to be some /other/ thread - not scheduling related - that
your webapp created (note that it has a generic name).

> This is confusing for me because this is shown in log file when I try to
> deploy application.

Maybe ask the people who wrote the scheduler?

You may have to attach a profiler to the server and observe where these
threads are actually being created, and what actually happens when you
call the shutdown() method on your scheduler.

Hope that helps,
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxlm9kACgkQ9CaO5/Lv0PD31gCdGjtqde4FC7a3SWbsDWiggGpo
SLEAn1EwbJlLaTS17VIVmourUd35/QUJ
=bgTF
-----END PGP SIGNATURE-----

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


Mime
View raw message