ShaySo
ShaySo

Reputation: 21

Jetty - Un-deploy specific application

I have a single instance of Jetty that runs 5 web-applications. I want to un-deploy one of this application, my first thought was to delete the context from: $JETTY_HOME/contexts, it works but it's not clearing the whole application (I saw that some scheduled tasks are still running). So, I need another way to un-deploy the application, or some kind of a clean-up after removing the context.

Thanks in advance.

Upvotes: 0

Views: 93

Answers (1)

Steps
Steps

Reputation: 481

Deleting the war file or associated context XML file is generally enough to clear the context. You can also run .stop() from JMX if you have that module enabled in your Jetty instance.

In regards to Quartz, Jetty itself does not interact with scheduled jobs. This can be handled by the webapp itself signaling Quartz that it is exiting. Alternatively you can implement a ServletContextListener to instantiate the Quartz jobs which will handle the removal of contexts gracefully.

Related: Can you undeploy applications from JETTY?

Upvotes: 1

Related Questions