summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sca-java-1.x/trunk/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/launcher/DomainManagerLauncherBootstrap.java7
-rw-r--r--sca-java-1.x/trunk/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeImplementationDaemonBootstrap.java6
-rw-r--r--sca-java-1.x/trunk/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeImplementationLauncherBootstrap.java6
3 files changed, 3 insertions, 16 deletions
diff --git a/sca-java-1.x/trunk/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/launcher/DomainManagerLauncherBootstrap.java b/sca-java-1.x/trunk/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/launcher/DomainManagerLauncherBootstrap.java
index f96e19ed72..1bb117f385 100644
--- a/sca-java-1.x/trunk/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/launcher/DomainManagerLauncherBootstrap.java
+++ b/sca-java-1.x/trunk/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/launcher/DomainManagerLauncherBootstrap.java
@@ -48,7 +48,6 @@ public class DomainManagerLauncherBootstrap {
public void start() {
threadContextClassLoader = Thread.currentThread().getContextClassLoader();
- boolean started = false;
try {
Thread.currentThread().setContextClassLoader(runtimeClassLoader);
SCANodeFactory factory = SCANodeFactory.newInstance();
@@ -58,12 +57,8 @@ public class DomainManagerLauncherBootstrap {
// Set the domain manager's root directory
DomainManagerConfiguration domainManagerConfiguration = ((SCAClient) node).getService(DomainManagerConfiguration.class, "DomainManagerConfigurationComponent");
domainManagerConfiguration.setRootDirectory(rootDirectory);
-
- started = true;
} finally {
- if (!started) {
- Thread.currentThread().setContextClassLoader(threadContextClassLoader);
- }
+ Thread.currentThread().setContextClassLoader(threadContextClassLoader);
}
}
diff --git a/sca-java-1.x/trunk/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeImplementationDaemonBootstrap.java b/sca-java-1.x/trunk/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeImplementationDaemonBootstrap.java
index 8de2a3a3f9..b82b27d02d 100644
--- a/sca-java-1.x/trunk/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeImplementationDaemonBootstrap.java
+++ b/sca-java-1.x/trunk/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeImplementationDaemonBootstrap.java
@@ -44,16 +44,12 @@ public class NodeImplementationDaemonBootstrap {
public void start() {
threadContextClassLoader = Thread.currentThread().getContextClassLoader();
- boolean started = false;
try {
Thread.currentThread().setContextClassLoader(runtimeClassLoader);
SCANodeFactory factory = SCANodeFactory.newInstance();
daemon = factory.createSCANodeFromClassLoader("NodeDaemon.composite", threadContextClassLoader);
- started = true;
} finally {
- if (!started) {
- Thread.currentThread().setContextClassLoader(threadContextClassLoader);
- }
+ Thread.currentThread().setContextClassLoader(threadContextClassLoader);
}
}
diff --git a/sca-java-1.x/trunk/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeImplementationLauncherBootstrap.java b/sca-java-1.x/trunk/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeImplementationLauncherBootstrap.java
index 0264574fb9..f92e1a7406 100644
--- a/sca-java-1.x/trunk/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeImplementationLauncherBootstrap.java
+++ b/sca-java-1.x/trunk/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeImplementationLauncherBootstrap.java
@@ -50,15 +50,11 @@ public class NodeImplementationLauncherBootstrap {
public void start() {
threadContextClassLoader = Thread.currentThread().getContextClassLoader();
- boolean started = false;
try {
Thread.currentThread().setContextClassLoader(runtimeClassLoader);
delegate.start();
- started = true;
} finally {
- if (!started) {
- Thread.currentThread().setContextClassLoader(threadContextClassLoader);
- }
+ Thread.currentThread().setContextClassLoader(threadContextClassLoader);
}
}