summaryrefslogtreecommitdiffstats
path: root/sca-java-1.x/trunk/modules/implementation-node-runtime/src
diff options
context:
space:
mode:
authornash <nash@13f79535-47bb-0310-9956-ffa450edef68>2010-05-08 21:02:07 +0000
committernash <nash@13f79535-47bb-0310-9956-ffa450edef68>2010-05-08 21:02:07 +0000
commitb005770623eaf2a9015aa97a737c6e278abeba2d (patch)
treeeb31aab87a04ae4958ce365d542db3b3839ce1c2 /sca-java-1.x/trunk/modules/implementation-node-runtime/src
parent6e18fca36bd37a9dc7f6c65024b8a8ab833e3c1e (diff)
Prevent bootstrap launcher from changing caller's classloader setting (TUSCANY-3551)
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@942470 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-1.x/trunk/modules/implementation-node-runtime/src')
-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
2 files changed, 2 insertions, 10 deletions
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);
}
}