Skip to content

Commit

Permalink
ARQ-1759 Verify whether started process terminated prematurely
Browse files Browse the repository at this point in the history
  • Loading branch information
gpoul committed Apr 17, 2014
1 parent 6f86be2 commit 4a730cc
Showing 1 changed file with 12 additions and 0 deletions.
Expand Up @@ -156,6 +156,18 @@ public void run() {
while (startupTimeout > 0 && serviceURL == null) {
startupTimeout -= 500;
Thread.sleep(500);

// Verify that the process we're looking for is actually running
int ev = Integer.MIN_VALUE; // exit value of the process
IllegalThreadStateException itse = null; // Will be thrown when process is still running
try {
ev = wlpProcess.exitValue();
} catch (IllegalThreadStateException e) {
itse = e;
}

if (itse == null)
throw new LifecycleException("Process terminated prematurely; ev = " + ev);

if (vmid == null)
// Find WebSphere Liberty Profile VMs by looking for ws-launch.jar and the name of the server
Expand Down

0 comments on commit 4a730cc

Please sign in to comment.