Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] Embedded Jetty clean start up

Hello there,

I have an embedded Jetty pretty much done in same way as written here:
http://wiki.eclipse.org/Jetty/Tutorial/Embedding_Jetty

Except that I use XmlConfiguration to configure Jetty and I do allow
users to tamper with jetty.xml.

All is fine and dandy, but still, I have one question: how can I
detect that one (any?) webapp failed to start? Currently, Jetty does
log this fact, but returns cleanly from server.start() and responds
with HTTP 503 Service unavailable for given failed webapp. I want to
have "all or nothing" -- either all webapps started cleanly, or just
shutdown and let user sort it out.

Is there some "best practice" to detect is all of the contexts in
Jetty started cleanly? I'd want to signal the fact of failure using
exit code, to prevent Java Service Wrapper to start "bouncing" my app,
so, in this case, some specific exit code would tell JSW it's
0xdeadbeef, stop trying.


Thanks,
~t~


Back to the top