tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Funk <funk...@joedog.org>
Subject Re: Multiple Threads for one webapp
Date Fri, 30 Sep 2005 13:56:09 GMT
It seems you have a thread started in the background during the life of the 
application.
This thread goes to some external place of storage and to look for emails to 
send.
It seems this thread is not stopped when a context is reloaded.
When the app is reloaded - a new thread is started.
In this case - the app was restarted 6 times - leaving you 7 threads all 
looking to the smae external loctation for sending emails.

Solution: Use a ServletContextListerner to detect webapp shutdown so the 
thread may be stopped.


-Tim

Mahesh S Kudva wrote:

> Hi All
>  
>  I have setup virtual hosts for 3 apps with virtual hosts config as 
>  follows. These virtual hosts are first handled by Apache and mod_jk. My 
>  apps have scheduler and automated mailing services.
>  
>  <Host name="vhost.domain.com" debug="0" appBase=”deploy” 
> unpackWARs="true">
>          <Alias>www.vhost.domain.com</Alias>
>          <Logger className="org.apache.catalina.logger.FileLogger"
>              directory="${jboss.server.home.dir}/log" 
> prefix="vhost_log1."  suffix=".log" timestamp="true"/>
>           <Context path="" 
>  docBase="${jboss.server.home.dir}/deploy/application.war" debug="0" 
>  reloadable="true"/>
>  </Host>
>  
> This config is mailing the same mail 7 time. Further I noticed that 
> there  were 7 service started of the same kind. Querying the developer, 
> he said that he had coded the apps to have the mail sent once every week. 
> The mails are sent once every week but as said 7 copies of the same mail 
> is delivered.
>  
>  The request for the app results in page not found if I follow the 
>  following config, even thought there is no error in startup.
>  
>  <Context path="application" 
>  docBase="${jboss.server.home.dir}/deploy/application.war" debug="0" 
>  reloadable="true"/>
>  
>  
>  
>  Can you guys have any idea on this and help me troubleshoot ???
>  
>  
>  Regards & Thanks
>  ================
>  Mahesh S Kudva
> 
> 
> -------------------------------------------------------
> Robosoft Technologies - Partners in Product Development
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 

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


Mime
View raw message