summaryrefslogtreecommitdiffstats
path: root/sca-java-1.x/trunk
diff options
context:
space:
mode:
authornash <nash@13f79535-47bb-0310-9956-ffa450edef68>2011-08-12 10:52:45 +0000
committernash <nash@13f79535-47bb-0310-9956-ffa450edef68>2011-08-12 10:52:45 +0000
commitd5dafef7044f1ea07f297c5a414d2c9bf15ed3f9 (patch)
treeafe7d8c3970e3273ed2dbaf7ac80483e3023f111 /sca-java-1.x/trunk
parent27a316faa2427a503d71f8f5d990b02ceed7212e (diff)
TUSCANY-3919: Fix configuration problems in the calculator-distributed sample
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1157045 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-1.x/trunk')
-rw-r--r--sca-java-1.x/trunk/samples/calculator-distributed/README28
-rw-r--r--sca-java-1.x/trunk/samples/calculator-distributed/src/main/java/node/LaunchDomain.java5
-rw-r--r--sca-java-1.x/trunk/samples/calculator-distributed/src/main/resources/cloud.composite (renamed from sca-java-1.x/trunk/samples/calculator-distributed/cloud.composite)6
-rw-r--r--sca-java-1.x/trunk/samples/calculator-distributed/src/main/resources/cloud/NodeA.composite2
-rw-r--r--sca-java-1.x/trunk/samples/calculator-distributed/src/main/resources/cloud/NodeB.composite2
-rw-r--r--sca-java-1.x/trunk/samples/calculator-distributed/src/main/resources/cloud/NodeC.composite2
-rw-r--r--sca-java-1.x/trunk/samples/calculator-distributed/src/main/resources/domain.composite (renamed from sca-java-1.x/trunk/samples/calculator-distributed/domain.composite)0
-rw-r--r--sca-java-1.x/trunk/samples/calculator-distributed/src/main/resources/workspace.xml (renamed from sca-java-1.x/trunk/samples/calculator-distributed/workspace.xml)8
-rw-r--r--sca-java-1.x/trunk/samples/calculator-distributed/src/test/java/calculator/CalculatorDistributedTestCase.java2
9 files changed, 31 insertions, 24 deletions
diff --git a/sca-java-1.x/trunk/samples/calculator-distributed/README b/sca-java-1.x/trunk/samples/calculator-distributed/README
index 3113202d90..b1bb60ad25 100644
--- a/sca-java-1.x/trunk/samples/calculator-distributed/README
+++ b/sca-java-1.x/trunk/samples/calculator-distributed/README
@@ -24,17 +24,17 @@ Please run the commands in this order.
OR if you don't have ant, on Windows use
-java -cp src\main\resources;..\..\lib\tuscany-sca-manifest.jar;target\sample-calculator-distributed.jar node.LaunchDomain
-java -cp src\main\resources;..\..\lib\tuscany-sca-manifest.jar;target\sample-calculator-distributed.jar node.LaunchCalculatorNodeB
-java -cp src\main\resources;..\..\lib\tuscany-sca-manifest.jar;target\sample-calculator-distributed.jar node.LaunchCalculatorNodeC
-java -cp src\main\resources;..\..\lib\tuscany-sca-manifest.jar;target\sample-calculator-distributed.jar node.LaunchCalculatorNodeA
+java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-calculator-distributed.jar node.LaunchDomain
+java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-calculator-distributed.jar node.LaunchCalculatorNodeB
+java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-calculator-distributed.jar node.LaunchCalculatorNodeC
+java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-calculator-distributed.jar node.LaunchCalculatorNodeA
and on *nix do
-java -cp src/main/resources:../../lib/tuscany-sca-manifest.jar:target/sample-calculator-distributed.jar node.LaunchDomain
-java -cp src/main/resources:../../lib/tuscany-sca-manifest.jar:target/sample-calculator-distributed.jar node.LaunchCalculatorNodeB
-java -cp src/main/resources:../../lib/tuscany-sca-manifest.jar:target/sample-calculator-distributed.jar node.LaunchCalculatorNodeC
-java -cp src/main/resources:../../lib/tuscany-sca-manifest.jar:target/sample-calculator-distributed.jar node.LaunchCalculatorNodeA
+java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-calculator-distributed.jar node.LaunchDomain
+java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-calculator-distributed.jar node.LaunchCalculatorNodeB
+java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-calculator-distributed.jar node.LaunchCalculatorNodeC
+java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-calculator-distributed.jar node.LaunchCalculatorNodeA
The processes started on each of these command prompts can be ended by typing 'q'.
@@ -110,13 +110,17 @@ calculator/
configuration to the distributed
nodes
resources/
- cloud - The SCA composite files that describe
+ workspace.xml - The domain manager configuration files that
+ domain.composite describe the configuration of the domain's
+ cloud.composite contributions, composites, and nodes
+
+ cloud/ - The SCA composite files that describe
the configuration of each node
- nodeA - the SCA assembly for nodeA's part of the
+ nodeA/ - the SCA assembly for nodeA's part of the
calculator application
- nodeB - the SCA assembly for nodeB's part of the
+ nodeB/ - the SCA assembly for nodeB's part of the
calculator application
- nodeC - the SCA assembly for nodeC's part of the
+ nodeC/ - the SCA assembly for nodeC's part of the
calculator application
test/
java/
diff --git a/sca-java-1.x/trunk/samples/calculator-distributed/src/main/java/node/LaunchDomain.java b/sca-java-1.x/trunk/samples/calculator-distributed/src/main/java/node/LaunchDomain.java
index 8b4fe566a1..114c07edeb 100644
--- a/sca-java-1.x/trunk/samples/calculator-distributed/src/main/java/node/LaunchDomain.java
+++ b/sca-java-1.x/trunk/samples/calculator-distributed/src/main/java/node/LaunchDomain.java
@@ -26,8 +26,11 @@ import org.apache.tuscany.sca.node.launcher.DomainManagerLauncher;
* in each node that talk to the registry should be replaced also.
*/
public class LaunchDomain {
+ private static String[] defaultRootDir = {"./target/classes/"};
+
public static void main(String[] args) throws Exception {
- DomainManagerLauncher.main(args);
+ String[] rootDir = args.length > 0 ? args : defaultRootDir;
+ DomainManagerLauncher.main(rootDir);
}
}
diff --git a/sca-java-1.x/trunk/samples/calculator-distributed/cloud.composite b/sca-java-1.x/trunk/samples/calculator-distributed/src/main/resources/cloud.composite
index 85e2f9c7f3..1d37da39de 100644
--- a/sca-java-1.x/trunk/samples/calculator-distributed/cloud.composite
+++ b/sca-java-1.x/trunk/samples/calculator-distributed/src/main/resources/cloud.composite
@@ -20,7 +20,7 @@
<composite name="cloud.composite"
targetNamespace="http://tuscany.apache.org/xmlns/sca/1.0"
xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:ns1="http://www.osoa.org/xmlns/sca/1.0">
- <include name="ns2:NodeA" uri="http://tuscany.apache.org/cloud" xmlns:ns2="http://sample/cloud"/>
- <include name="ns2:NodeB" uri="http://tuscany.apache.org/cloud" xmlns:ns2="http://sample/cloud"/>
- <include name="ns2:NodeC" uri="http://tuscany.apache.org/cloud" xmlns:ns2="http://sample/cloud"/>
+ <include name="ns2:NodeA" uri="http://tuscany.apache.org/cloud" xmlns:ns2="http://tuscany.apache.org/cloud"/>
+ <include name="ns2:NodeB" uri="http://tuscany.apache.org/cloud" xmlns:ns2="http://tuscany.apache.org/cloud"/>
+ <include name="ns2:NodeC" uri="http://tuscany.apache.org/cloud" xmlns:ns2="http://tuscany.apache.org/cloud"/>
</composite>
diff --git a/sca-java-1.x/trunk/samples/calculator-distributed/src/main/resources/cloud/NodeA.composite b/sca-java-1.x/trunk/samples/calculator-distributed/src/main/resources/cloud/NodeA.composite
index ed7fe55abc..7f03eb52c2 100644
--- a/sca-java-1.x/trunk/samples/calculator-distributed/src/main/resources/cloud/NodeA.composite
+++ b/sca-java-1.x/trunk/samples/calculator-distributed/src/main/resources/cloud/NodeA.composite
@@ -19,7 +19,7 @@
-->
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
xmlns:t="http://tuscany.apache.org/xmlns/sca/1.0"
- targetNamespace="http://sample/cloud"
+ targetNamespace="http://tuscany.apache.org/cloud"
xmlns:s="http://sample"
name="NodeA">
diff --git a/sca-java-1.x/trunk/samples/calculator-distributed/src/main/resources/cloud/NodeB.composite b/sca-java-1.x/trunk/samples/calculator-distributed/src/main/resources/cloud/NodeB.composite
index 8f29cc17aa..74f06cc289 100644
--- a/sca-java-1.x/trunk/samples/calculator-distributed/src/main/resources/cloud/NodeB.composite
+++ b/sca-java-1.x/trunk/samples/calculator-distributed/src/main/resources/cloud/NodeB.composite
@@ -19,7 +19,7 @@
-->
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
xmlns:t="http://tuscany.apache.org/xmlns/sca/1.0"
- targetNamespace="http://sample/cloud"
+ targetNamespace="http://tuscany.apache.org/cloud"
xmlns:s="http://sample"
name="NodeB">
diff --git a/sca-java-1.x/trunk/samples/calculator-distributed/src/main/resources/cloud/NodeC.composite b/sca-java-1.x/trunk/samples/calculator-distributed/src/main/resources/cloud/NodeC.composite
index 9ad132b0d4..f29230365a 100644
--- a/sca-java-1.x/trunk/samples/calculator-distributed/src/main/resources/cloud/NodeC.composite
+++ b/sca-java-1.x/trunk/samples/calculator-distributed/src/main/resources/cloud/NodeC.composite
@@ -19,7 +19,7 @@
-->
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
xmlns:t="http://tuscany.apache.org/xmlns/sca/1.0"
- targetNamespace="http://sample/cloud"
+ targetNamespace="http://tuscany.apache.org/cloud"
xmlns:s="http://sample"
name="NodeC">
diff --git a/sca-java-1.x/trunk/samples/calculator-distributed/domain.composite b/sca-java-1.x/trunk/samples/calculator-distributed/src/main/resources/domain.composite
index 643e22d0cf..643e22d0cf 100644
--- a/sca-java-1.x/trunk/samples/calculator-distributed/domain.composite
+++ b/sca-java-1.x/trunk/samples/calculator-distributed/src/main/resources/domain.composite
diff --git a/sca-java-1.x/trunk/samples/calculator-distributed/workspace.xml b/sca-java-1.x/trunk/samples/calculator-distributed/src/main/resources/workspace.xml
index 7d6d3dbdbd..818b0550dc 100644
--- a/sca-java-1.x/trunk/samples/calculator-distributed/workspace.xml
+++ b/sca-java-1.x/trunk/samples/calculator-distributed/src/main/resources/workspace.xml
@@ -18,8 +18,8 @@
* under the License.
-->
<workspace xmlns="http://tuscany.apache.org/xmlns/sca/1.0" xmlns:ns1="http://tuscany.apache.org/xmlns/sca/1.0">
- <contribution location="file:./src/main/resources/nodeA" uri="nodeA"/>
- <contribution location="file:./src/main/resources/nodeB" uri="nodeB"/>
- <contribution location="file:./src/main/resources/nodeC" uri="nodeC"/>
- <contribution location="file:./src/main/resources/cloud" uri="http://tuscany.apache.org/cloud"/>
+ <contribution location="file:./target/classes/nodeA" uri="nodeA"/>
+ <contribution location="file:./target/classes/nodeB" uri="nodeB"/>
+ <contribution location="file:./target/classes/nodeC" uri="nodeC"/>
+ <contribution location="file:./target/classes/cloud" uri="http://tuscany.apache.org/cloud"/>
</workspace>
diff --git a/sca-java-1.x/trunk/samples/calculator-distributed/src/test/java/calculator/CalculatorDistributedTestCase.java b/sca-java-1.x/trunk/samples/calculator-distributed/src/test/java/calculator/CalculatorDistributedTestCase.java
index 2a6f3af002..92197ac07c 100644
--- a/sca-java-1.x/trunk/samples/calculator-distributed/src/test/java/calculator/CalculatorDistributedTestCase.java
+++ b/sca-java-1.x/trunk/samples/calculator-distributed/src/test/java/calculator/CalculatorDistributedTestCase.java
@@ -50,7 +50,7 @@ public class CalculatorDistributedTestCase {
System.out.println("Setting up domain");
DomainManagerLauncher managerLauncher = DomainManagerLauncher.newInstance();
- manager = managerLauncher.createDomainManager();
+ manager = managerLauncher.createDomainManager("./target/classes/");
manager.start();
SCANodeFactory nodeFactory = SCANodeFactory.newInstance();