Nevermind, the contextDestroyed() method is actually called as
supposed and expected. The problem seems the logger is no longer able
to output anything in the log file at this point even if I configured
it to flush immediately the output. I replaced the
statement by a System.out.println() followed by a System.out.flush()
and I can see the output.

However, it seems the context is destroyed before my objects are
themselves destroyed since I still receive messages in the
catalina.out about them, like this one:

INFOS: Closing Spring root WebApplicationContext
Destruction du contexte applicatif. Application: CaissesDispo,
Serveur: Apache Tomcat/8.0.32_ds
Désinscrit les écouteurs de requêtes uCMDB.
Détruit le bassin de connexions uCMDB.
Application: CaissesDispo terminée.
mars 17, 2016 7:44:15 PM
AVERTISSEMENT: The web application [CaissesDispo] appears to have
started a thread named [UCMDB Model Notifications Service Notification
Thread] but has failed to stop it. This is very likely to create a
memory leak. Stack trace of thread:
 sun.misc.Unsafe.park(Native Method)
mars 17, 2016 7:44:15 PM

Anything can be done to avoid these messages if the objects are
actually destroyed?

Daniel Savard

2016-03-17 19:08 GMT-04:00 Daniel Savard <>:
> From the manager clicking on the Stop button for the application. For
> the instance, on Windows just stop the Tomcat service, on Linux, just
> run the stop script.
> -----------------
> Daniel Savard
> 2016-03-17 8:47 GMT-04:00 Caldarale, Charles R <>:
>>> From: Daniel Savard []
>>> Subject: Re: contextDestroyed() method not called
>> Read the mailing list rules: don't top post.
>>> I'm running it on Window 2012 Server as well as Linux RHEL.
>> Ok, good to know.
>>> And no, I am not sending a terminate signal with kill -9. That's why I
>>> said I am stopping the application or the instance (both cases depict
>>> the same behavior) rather than saying I am terminating it.
>> Again, how are you doing this?
>>  - Chuck
>> MATERIAL and is thus for use only by the intended recipient. If you received 
>> this in error, please contact the sender and delete the e-mail and its 
>> attachments from all computers.
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to