From 2319b28ec9b778d4cdbff34b3efd2800cbd3a0f6 Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Thu, 28 Jun 2007 17:36:35 +0000
Subject: [PATCH] When we launch the status panel from the Setup, do not wait till the user exits the status panel to consider that the method processBackgroundTask is completed.  If the process did not end after 3 seconds assume that it could be launched.  This is done in particular to be able to have a progress icon that is displayed only during the launch of the status panel and not all the time the status panel is running.

---
 opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/ui/QuickSetup.java |   22 +++++++++++++++++++++-
 1 files changed, 21 insertions(+), 1 deletions(-)

diff --git a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/ui/QuickSetup.java b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/ui/QuickSetup.java
index 50276d2..0d85b7c 100644
--- a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/ui/QuickSetup.java
+++ b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/ui/QuickSetup.java
@@ -384,7 +384,27 @@
            */
           env.remove("JAVA_BIN");
           Process process = pb.start();
-          int returnValue = process.waitFor();
+          /**
+           * Wait for 3 seconds.  Assume that if the process has not exited
+           * everything went fine.
+           */
+          int returnValue = 0;
+          try
+          {
+            Thread.sleep(3000);
+          }
+          catch (Throwable t)
+          {
+          }
+          try
+          {
+            returnValue = process.exitValue();
+          }
+          catch (IllegalThreadStateException ithse)
+          {
+            // The process has not exited: assume that the status panel could
+            // be launched successfully.
+          }
 
           if (returnValue != 0)
           {

--
Gitblit v1.10.0