diff options
author | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2010-03-02 23:30:54 +0000 |
---|---|---|
committer | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2010-03-02 23:30:54 +0000 |
commit | bfa3a326441cbe17ea6786dbdd658832fc2e93b8 (patch) | |
tree | 69c7d61ba6670ae696612b1f0a374936c0d3e4a9 /sca-java-2.x/trunk/modules/binding-sca-runtime-rmi | |
parent | 90b9b0f259d291fd9d5c801eb51d7fc20b265c1b (diff) |
Add the ability to map binding.sca to any bindings in the runtime by configuration
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@918261 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/binding-sca-runtime-rmi')
4 files changed, 16 insertions, 3 deletions
diff --git a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/AsynchTestCase.java b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/AsynchTestCase.java index 0dbe8b864b..e196b9cdc6 100644 --- a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/AsynchTestCase.java +++ b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/AsynchTestCase.java @@ -38,7 +38,7 @@ public class AsynchTestCase { @BeforeClass
public static void init() throws Exception {
System.out.println("Setting up nodes");
-
+ // System.setProperty("org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding", RMIBinding.TYPE.toString());
try {
// create and start nodes
Contribution contrib = new Contribution("asynch", "./target/test-classes/asynchReference");
@@ -60,6 +60,7 @@ public class AsynchTestCase { public static void destroy() throws Exception {
nodeA.stop();
nodeB.stop();
+ // System.clearProperty("org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding");
}
@Test
diff --git a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/CallbackTestCase.java b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/CallbackTestCase.java index b981bbc943..f679312447 100644 --- a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/CallbackTestCase.java +++ b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/CallbackTestCase.java @@ -36,6 +36,7 @@ public class CallbackTestCase { @BeforeClass
public static void init() throws Exception {
System.out.println("Setting up nodes");
+ // System.setProperty("org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding", RMIBinding.TYPE.toString());
try {
// create and start nodes
@@ -58,6 +59,7 @@ public class CallbackTestCase { public static void destroy() throws Exception {
nodeA.stop();
nodeB.stop();
+ // System.clearProperty("org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding");
}
//@Test
diff --git a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/PromotionTestCase.java b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/PromotionTestCase.java index 992850e470..e7d6d7fab9 100644 --- a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/PromotionTestCase.java +++ b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/PromotionTestCase.java @@ -20,6 +20,7 @@ package org.apache.tuscany.sca.binding.sca.rmi; import junit.framework.Assert;
+import org.apache.tuscany.sca.binding.rmi.RMIBinding;
import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldClient;
import org.apache.tuscany.sca.node.Contribution;
import org.apache.tuscany.sca.node.Node;
@@ -37,6 +38,7 @@ public class PromotionTestCase { @BeforeClass
public static void init() throws Exception {
System.out.println("Setting up nodes");
+ System.setProperty("org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding", RMIBinding.TYPE.toString());
try {
// create and start nodes
@@ -59,6 +61,8 @@ public class PromotionTestCase { public static void destroy() throws Exception {
nodeA.stop();
nodeB.stop();
+ System.clearProperty("org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding");
+
}
@Test
diff --git a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/SimpleTestCase.java b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/SimpleTestCase.java index a6f4f216d6..4154ed778a 100644 --- a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/SimpleTestCase.java +++ b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/SimpleTestCase.java @@ -20,6 +20,7 @@ package org.apache.tuscany.sca.binding.sca.rmi; import junit.framework.Assert;
+import org.apache.tuscany.sca.binding.rmi.RMIBinding;
import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldClient;
import org.apache.tuscany.sca.node.Contribution;
import org.apache.tuscany.sca.node.Node;
@@ -31,21 +32,24 @@ import org.oasisopen.sca.ServiceUnavailableException; public class SimpleTestCase {
+ private static NodeFactory factory;
public static Node nodeA;
public static Node nodeB;
@BeforeClass
public static void init() throws Exception {
System.out.println("Setting up nodes");
+ System.setProperty("org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding", RMIBinding.TYPE.toString());
try {
+ factory = NodeFactory.getInstance();
// create and start nodes
Contribution contrib = new Contribution("reference", "./target/test-classes/simpleReference");
- nodeA = NodeFactory.getInstance().createNode("HelloWorld.composite", contrib);
+ nodeA = factory.createNode("HelloWorld.composite", contrib);
nodeA.start();
contrib = new Contribution("service", "./target/test-classes/simpleService");
- nodeB = NodeFactory.getInstance().createNode("HelloWorld.composite", contrib);
+ nodeB = factory.createNode("HelloWorld.composite", contrib);
nodeB.start();
} catch (Exception ex) {
@@ -59,6 +63,8 @@ public class SimpleTestCase { public static void destroy() throws Exception {
nodeA.stop();
nodeB.stop();
+ factory.destroy();
+ System.clearProperty("org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding");
}
@Test
|