Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-dev] DeploymentManager and WebAppContext.setThrowUnavailableOnStartupException


Hi,

I'm a bit curious about how DeploymentManager is intended to behave when a WebAppContext is configured with setThrowUnavailableOnStartupException(true) and the WebAppContext fails with some exception during startup.

We are trying to configure our (single) webapp in a Jetty distribution in such a way that Jetty will log the webapp startup failure and then let the JVM exit.

Currently, DeploymentManager.requestAppGoal catches Throwable, logs a warning and continues.

Is there some knob to switch which will make Jetty (dist) exit on a failed webapp?

This works fine in our embedded use cases, but in some cases we seem to be stuck with the external container/distribution model.

We would like to see the startup of the container fail, instead we observe the following:

% sh jetty/bin/jetty.sh start
[main] WARN org.eclipse.jetty.deploy.DeploymentManager - Unable to reach node goal: started
 (exception with stack trace..)
[main] INFO org.eclipse.jetty.server.ServerConnector - Started ServerConnector@7668892a{HTTP/1.1,[http/1.1]}{0.0.0.0:8080}
[main] INFO org.eclipse.jetty.server.Server - Started @6388ms
OK Tue Dec  8 14:22:33 CET 2015

Cheers,
Eirik.

Back to the top