Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tomcat shutdown problem

 
Selvakumar Dharmaraj
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
In my application while starting the Tomcat server I am starting two threads by using 'load on startup' element in 'web.xml'. There is no problem while starting the server. But while shutdown the server I am getting the following warning message as following. Because of that the threads where not killed and doing its function even after the server shutdown.( I am using Tomcat 5.18 build version )
---------------Error----------------------------
INFO: Stoping http11 protocol on 8080 Catalina:type=ThreadPool,name=http8080
18-Mar-2004 16:48:00 org.apache.catalina.core.StandardHostDeployer remove
INFO: Removing web application at context path /okn
18-Mar-2004 16:48:01 org.apache.catalina.logger.LoggerBase stop
INFO: unregistering logger Catalina:type=Logger,host=localhost
18-Mar-2004 16:48:01 org.apache.catalina.logger.LoggerBase stop
INFO: unregistering logger Catalina:type=Logger
----------Started newssheet updation-----------
18-Mar-2004 16:48:13 org.apache.catalina.loader.WebappClassLoader findResourceIn
ternal
INFO: Illegal access: this web application instance has been stopped already (th
e eventual following stack trace is caused by an error thrown for debugging purp
oses as well as to attempt to terminate the thread which caused the illegal acce
ss, and has no functional impact)
18-Mar-2004 16:48:13 org.apache.catalina.loader.WebappClassLoader loadClass
INFO: Illegal access: this web application instance has been stopped already (th
e eventual following stack trace is caused by an error thrown for debugging purp
oses as well as to attempt to terminate the thread which caused the illegal acce
ss, and has no functional impact)
---------------Error----------------------------
I am using log4j for my application to log the activities. Could be the problem because of this??!
Kindly help me to solve this problem.
regards,
Selvakumar.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13056
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
load-on-startup does not normally start an extra Thread - it simply assures that a servlet instance is created as part of the normal startup procedure.
Bill
 
Selvakumar Dharmaraj
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes you are correct, at the instance creation I am starting a timer to fetch the mails from the mail server. And another timer for some other purposes. Even after I explicitly kill the Tomcat server window, the threads hitting the server for mail fetching.
How shall I kill the threads at the server shutdown by programmatically?
Selva.
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
use .setDaemon(true)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic