Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Stopping an deployed application

 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In order to disable an deployed application i.e.stop receiving request,I am using the Manager web application.
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/manager-howto.html
But I find that when I restart the server the web application accepts request => the stopping of application is temporary. I want the web application not to receive requests over server restarts. How do I do that?

Thanks
Pradeep
 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One more question: Is it possible that I programmtically make the web application to stop accepting request when the server restarts?

Thanks again!
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think what you're really looking for is to 'undeploy' the application. Remove it entirely from the view of Tomcat, and it won't start.

Be careful using the Manager app to 'remove' an application!!! It will *delete* (in an unrecoverable way) the entire folder containing your deployed web app. This is not such a big deal if you've got a backup somewhere else.

Otherwise, you could set up a Filter that maps to all request (/*). The filter could check some "other area" to determine whether to respond to requests (pass it along the chain) or whether to 'drop' it (simply return, or optionally show a 'not available' page).

The "other area" can be anything like a database, a file, etc. This 'other area' can be programatically accessed.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic