tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex <>
Subject Re: How to solve "To prevent a memory leak"
Date Thu, 16 Sep 2010 15:33:59 GMT
  It seem that moving the MySql driver to $tomcat/lib solves the problem 
with the jdbc connection,
buut the problem with quartz still exists.

I'm using tomcat 6.0.29

I wrote a listener :
public class ServletContextAttribListener implements 
ServletContextListener, ServletContextAttributeListener {

     public void contextInitialized(ServletContextEvent e) {
         System.out.println("Context "+ e.getServletContext() +" 

     public void contextDestroyed(ServletContextEvent e) {

     public void attributeAdded(ServletContextAttributeEvent e) {
         System.out.println("Added attribute "+ e.getName()+" with value 

     public void attributeRemoved(ServletContextAttributeEvent e) {
         System.out.println("Removed attribute "+ e.getName()+" with 
value "+e.getValue());

     public void attributeReplaced(ServletContextAttributeEvent e) {
         System.out.println("Replaced attribute "+ e.getName()+" with 
value "+e.getValue());

to check what is loaded but all what comes out is:

Added attribute with value
Added attribute 
org.springframework.web.context.WebApplicationContext.ROOT with value 
Root WebApplicationContext: startup date [Thu Sep 16 16:32:12 CEST 
2010]; root of context hierarchy
Context org.apache.catalina.core.ApplicationContextFacade@ec0b80 initialized


Am 2010-09-16 15:37, schrieb Caldarale, Charles R:
>> From: Alex []
>> Subject: How to solve "To prevent a memory leak"
>> The webapp work as it should, but on shutdown or restart the apache
>> tomcat server I always get following output.
>> The webapp is not stopped and I have to kill the process manually.
>> How can I solve this?
> Fix your webapp to properly dispose of any threads it starts.  Since your webapp started
them, it's up to your webapp to stop them.  You probably want to use an appropriate lifecycle
listener (as defined in the servlet spec) to do the necessary housekeeping.
>   - Chuck
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:

View raw message