I have a Java web app which I'm deploying using Tomcat but I'm having some trouble with this.
The problem is that my web app has to talk to some native libraries (via JNI) and those libraries do not handle errors that gracefully so if I try to start Tomcat and the native calls fail Tomcat startup halts partway through and does not start.
What I would like to do is have Tomcat not start this web app when it starts as I'll be using other means to start the web app which will ensure that the native calls will work. Specifically the native calls are to talk to another system which must already be running for the native calls to succeed.
One interesting thing I've found is that if I reload the app once Tomcat is successfully running failures in the native libraries only cause the context to fail and Tomcat continues running fine.
I've googled around and seen pointers to the context.xml file but it is unclear to me if I can use this to achieve my aim as the Tomcat reference doesn't seem to list any properties which stop a context automatically being loaded at startup.