summaryrefslogtreecommitdiffstats
path: root/sca-java-1.x/trunk/samples/calculator-distributed/src/main
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/samples/calculator-distributed/src/main
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/samples/calculator-distributed/src/main')
-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.composite26
-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.composite26
-rw-r--r--sca-java-1.x/trunk/samples/calculator-distributed/src/main/resources/workspace.xml25
7 files changed, 84 insertions, 4 deletions
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/src/main/resources/cloud.composite b/sca-java-1.x/trunk/samples/calculator-distributed/src/main/resources/cloud.composite
new file mode 100644
index 0000000000..1d37da39de
--- /dev/null
+++ b/sca-java-1.x/trunk/samples/calculator-distributed/src/main/resources/cloud.composite
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<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://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/src/main/resources/domain.composite b/sca-java-1.x/trunk/samples/calculator-distributed/src/main/resources/domain.composite
new file mode 100644
index 0000000000..643e22d0cf
--- /dev/null
+++ b/sca-java-1.x/trunk/samples/calculator-distributed/src/main/resources/domain.composite
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite name="domain.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:CalculatorA" uri="nodeA" xmlns:ns2="http://sample"/>
+ <include name="ns2:CalculatorB" uri="nodeB" xmlns:ns2="http://sample"/>
+ <include name="ns2:CalculatorC" uri="nodeC" xmlns:ns2="http://sample"/>
+</composite>
diff --git a/sca-java-1.x/trunk/samples/calculator-distributed/src/main/resources/workspace.xml b/sca-java-1.x/trunk/samples/calculator-distributed/src/main/resources/workspace.xml
new file mode 100644
index 0000000000..818b0550dc
--- /dev/null
+++ b/sca-java-1.x/trunk/samples/calculator-distributed/src/main/resources/workspace.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * 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:./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>