We are starting an external process from a Servlet.
try {
Process proc = Runtime.getRuntime().exec("java -jar " + jarLocation );
The servlet and the external process access the same database with the same userid/pwd.
The servlet does not wait for the external process to finish.
The servlet finishes its' processing in less than a second.
When started from the Servlet, the external app takes at least two minutes to complete.
When run in stand-alone mode the external app takes about 5 seconds to complete.
We tried stopping the web app after the external process was started and this resulted in the external process finishing immediately.
So, there appears to be some sort of interraction between the Servlet and the external process that is causing the process to take way too long to complete. We have been trying to figure out what could be happening for a couple of days and have gotten nowhere.
Does anybody have any idea what could be going on here?