1.) I think you mean Exceptions that kill the DW application because there are some desirable exceptions, such as WebAppExceptions. So you just need to check if your application is working. If there is a big problem, your DW application does not start and therefore cannot respond to reuqests.
Here are some additional ideas: a.) If you want to test external dependencies, testing in jenkins or on your local machine is not a good idea. To test your application in the LIVE environment, you can create HealthChecks and test it using curling or http-client tools. You should get json like:
{"deadlocks":{"healthy":true},"database":{"healthy":true}}
Check this from extern, for example, remove this DW instance from your loadbalancer if the healthchecks singnals are unhealthy. Add one Healthcheck for all the important things, so you can be sure that your application is healthy or not.
b.) Perform some resource tests after starting your application. If you get a response, your DW application will start. c.) Check your journal. Find the log level ERROR or WARN. If there are null entries, you can assume that your application runs without exception.
2.) Just make an HTTP request to your resource ;-) The answer means that your application is running.
3.) I am using ShutdownHooks. There I check all the important things, for example, the DB connection is closed ... It is usually normal to close the application gracefully.
You can add code cut to your Service constructor.
public YourService(){ ... // In case vm shutdown Runtime.getRuntime().addShutdownHook(new Thread() { @Override public void run() { // what should be closed if forced shudown // .... LOG.info(String.format("--- End of ShutDownHook (%s) ---", APPLICATION_NAME)); } }); ... }
If this is not the answer, please provide additional information.