I have few web services deployed on tomcat and one of the service is configured as CRON job which runs periodically. Because of this non-deamon thread i suspect that the tomcat doesnt stop this service when tomcat itself has been stopped. How can I make sure that tomcat stops even the non deamon threads when I stop the server. Do we have any configurations that does this?
vinod meda wrote:Can you please provide a sample code for this?
I think you need to do your own homework here. How you shut down the resource depends on how you set it up. All I can do is advise where to call it from. And, as I said, you call it from an override on the servlet destroy() method if a servlet set it up. If you used an an application startup context listener, you'd terminate in the corresponding shutdown listener.
Being persecuted doesn't in any way prove your righteousness or your beliefs. Many people get persecuted because they are repugnant or annoying. Or just because they can be.
posted 9 years ago
Hey. i am not sure which CRON manager we are using as I recently joined the proj. But, we are not using any servlet to start the job we use the jave Timet class to schedule the job.
Do Re Mi Fa So La Tiny Ad
Sauce Labs - World's Largest Continuous Testing Cloud for Websites and Mobile Apps