Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew M. Finkbeiner2014-09-16 19:39:17 -0400
committerAndrew M. Finkbeiner2014-09-16 19:39:41 -0400
commit75e501d19b8cf1b8a51567a86d5136bf4a45b6c7 (patch)
tree59c5fea634436c45e1d2b0328c7bc5b8747f0f74
parent5d66aa13da74dd3fb3fbc92307731e8c4c873ae6 (diff)
downloadorg.eclipse.osee-0.18.0.v201409170143_RC.tar.gz
org.eclipse.osee-0.18.0.v201409170143_RC.tar.xz
org.eclipse.osee-0.18.0.v201409170143_RC.zip
bug[ats_ATS107154]: Fix ote server shutdown0.18.0.v201409191853_REL0.18.0.v201409170143_RC
-rw-r--r--plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/ext/CxfJaxRsFactory.java1
-rw-r--r--plugins/org.eclipse.osee.ote.master.product/org.eclipse.osee.ote.master.product6
-rw-r--r--plugins/org.eclipse.osee.ote.master.rest.client/src/org/eclipse/osee/ote/master/rest/client/internal/RemoveServer.java7
-rw-r--r--plugins/org.eclipse.osee.ote.server/src/org/eclipse/osee/ote/server/internal/OteServiceStarterImpl.java12
4 files changed, 15 insertions, 11 deletions
diff --git a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/ext/CxfJaxRsFactory.java b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/ext/CxfJaxRsFactory.java
index 305b7cca4e..fa37de53e5 100644
--- a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/ext/CxfJaxRsFactory.java
+++ b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/ext/CxfJaxRsFactory.java
@@ -104,7 +104,6 @@ public final class CxfJaxRsFactory implements JaxRsFactory {
}
public void stop() {
- RuntimeDelegate.setInstance(null);
if (providers != null) {
providers.clear();
providers = null;
diff --git a/plugins/org.eclipse.osee.ote.master.product/org.eclipse.osee.ote.master.product b/plugins/org.eclipse.osee.ote.master.product/org.eclipse.osee.ote.master.product
index c4fcb5c2c5..1fa54eecde 100644
--- a/plugins/org.eclipse.osee.ote.master.product/org.eclipse.osee.ote.master.product
+++ b/plugins/org.eclipse.osee.ote.master.product/org.eclipse.osee.ote.master.product
@@ -17,9 +17,7 @@
<windowImages/>
<launcher>
- <linux useIco="false"/>
- <macosx useIco="false"/>
- <solaris useIco="false"/>
+ <solaris/>
<win useIco="false">
<bmp/>
</win>
@@ -43,7 +41,7 @@
<plugin id="org.eclipse.equinox.ds" autoStart="true" startLevel="0" />
<plugin id="org.eclipse.equinox.http.jetty" autoStart="true" startLevel="0" />
<plugin id="org.eclipse.equinox.http.servlet" autoStart="true" startLevel="0" />
- <plugin id="org.eclipse.osee.rest.admin" autoStart="true" startLevel="0" />
+ <plugin id="org.eclipse.osee.jaxrs.server" autoStart="true" startLevel="0" />
</configurations>
</product>
diff --git a/plugins/org.eclipse.osee.ote.master.rest.client/src/org/eclipse/osee/ote/master/rest/client/internal/RemoveServer.java b/plugins/org.eclipse.osee.ote.master.rest.client/src/org/eclipse/osee/ote/master/rest/client/internal/RemoveServer.java
index 2cf3eafb5d..764e541678 100644
--- a/plugins/org.eclipse.osee.ote.master.rest.client/src/org/eclipse/osee/ote/master/rest/client/internal/RemoveServer.java
+++ b/plugins/org.eclipse.osee.ote.master.rest.client/src/org/eclipse/osee/ote/master/rest/client/internal/RemoveServer.java
@@ -1,11 +1,9 @@
package org.eclipse.osee.ote.master.rest.client.internal;
import java.net.URI;
-import java.util.UUID;
import java.util.concurrent.Callable;
import javax.ws.rs.HttpMethod;
-import javax.ws.rs.client.Entity;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.UriBuilder;
@@ -27,15 +25,14 @@ public class RemoveServer implements Callable<OTEMasterServerResult> {
@Override
public OTEMasterServerResult call() throws Exception {
- URI targetUri =
- UriBuilder.fromUri(uri).path(OTEMasterServerImpl.CONTEXT_NAME).path(OTEMasterServerImpl.CONTEXT_SERVERS).path(server.getUUID().toString()).build();
-
OTEMasterServerResult result = new OTEMasterServerResult();
try {
+ URI targetUri = UriBuilder.fromUri(uri).path(OTEMasterServerImpl.CONTEXT_NAME).path(OTEMasterServerImpl.CONTEXT_SERVERS).path(server.getUUID().toString()).build();
webClientProvider.target(targetUri).request(MediaType.APPLICATION_XML).method(HttpMethod.DELETE);
} catch (Throwable th) {
result.setSuccess(false);
result.setThrowable(th);
+ th.printStackTrace();
}
return result;
}
diff --git a/plugins/org.eclipse.osee.ote.server/src/org/eclipse/osee/ote/server/internal/OteServiceStarterImpl.java b/plugins/org.eclipse.osee.ote.server/src/org/eclipse/osee/ote/server/internal/OteServiceStarterImpl.java
index c9ede08d91..b8cd5ed3ce 100644
--- a/plugins/org.eclipse.osee.ote.server/src/org/eclipse/osee/ote/server/internal/OteServiceStarterImpl.java
+++ b/plugins/org.eclipse.osee.ote.server/src/org/eclipse/osee/ote/server/internal/OteServiceStarterImpl.java
@@ -23,11 +23,14 @@ import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
+import java.util.concurrent.ExecutionException;
import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
import java.util.logging.Level;
import org.apache.activemq.broker.BrokerService;
@@ -51,6 +54,7 @@ import org.eclipse.osee.ote.core.environment.interfaces.IHostTestEnvironment;
import org.eclipse.osee.ote.core.environment.interfaces.IRuntimeLibraryManager;
import org.eclipse.osee.ote.core.environment.interfaces.ITestEnvironmentServiceConfig;
import org.eclipse.osee.ote.master.rest.client.OTEMasterServer;
+import org.eclipse.osee.ote.master.rest.client.OTEMasterServerResult;
import org.eclipse.osee.ote.master.rest.model.OTEServer;
import org.eclipse.osee.ote.server.OteServiceStarter;
import org.eclipse.osee.ote.server.PropertyParamter;
@@ -315,7 +319,13 @@ public class OteServiceStarterImpl implements OteServiceStarter, ServiceInfoPopu
lookupRegistration.stop();
taskToCancel.cancel(true);
} finally {
- masterServer.removeServer(masterURI, oteServerEntry);
+ Future<OTEMasterServerResult> removeServer = masterServer.removeServer(masterURI, oteServerEntry);
+ try {
+ removeServer.get(1000, TimeUnit.MILLISECONDS);
+ } catch (InterruptedException e) {
+ } catch (ExecutionException e) {
+ } catch (TimeoutException e) {
+ }
}
}
brokerService = null;

Back to the top