Author: lresende
Date: Mon Jul 21 22:47:08 2008
New Revision: 678649
URL: http://svn.apache.org/viewvc?rev=678649&view=rev
Log:
Distributed store scenario to help evaluate current issues when wiring
references to services from different hosts/ports using web 2.0 bindings
Added:
tuscany/java/sca/samples/store-distributed/ (props changed)
- copied from r678455, tuscany/java/sca/samples/store/
tuscany/java/sca/samples/store-distributed/cloud.composite (with props)
tuscany/java/sca/samples/store-distributed/domain.composite (with props)
tuscany/java/sca/samples/store-distributed/src/main/java/node/
tuscany/java/sca/samples/store-distributed/src/main/java/node/LaunchDomain.java
(with props)
tuscany/java/sca/samples/store-distributed/src/main/java/node/LaunchStoreNodeA.java
(with props)
tuscany/java/sca/samples/store-distributed/src/main/java/node/LaunchStoreNodeB.java
(with props)
tuscany/java/sca/samples/store-distributed/src/main/java/node/LaunchStoreNodeC.java
(with props)
tuscany/java/sca/samples/store-distributed/src/main/resources/cloud/
tuscany/java/sca/samples/store-distributed/src/main/resources/cloud/NodeA.composite
(with props)
tuscany/java/sca/samples/store-distributed/src/main/resources/cloud/NodeB.composite
(with props)
tuscany/java/sca/samples/store-distributed/src/main/resources/cloud/NodeC.composite
(with props)
tuscany/java/sca/samples/store-distributed/src/main/resources/nodeA/
tuscany/java/sca/samples/store-distributed/src/main/resources/nodeA/META-INF/
tuscany/java/sca/samples/store-distributed/src/main/resources/nodeA/META-INF/sca-contribution.xml
(with props)
tuscany/java/sca/samples/store-distributed/src/main/resources/nodeA/store.composite
(with props)
tuscany/java/sca/samples/store-distributed/src/main/resources/nodeB/
tuscany/java/sca/samples/store-distributed/src/main/resources/nodeB/META-INF/
tuscany/java/sca/samples/store-distributed/src/main/resources/nodeB/META-INF/sca-contribution.xml
(with props)
tuscany/java/sca/samples/store-distributed/src/main/resources/nodeB/store.composite
(with props)
tuscany/java/sca/samples/store-distributed/src/main/resources/nodeC/
tuscany/java/sca/samples/store-distributed/src/main/resources/nodeC/META-INF/
tuscany/java/sca/samples/store-distributed/src/main/resources/nodeC/META-INF/sca-contribution.xml
(with props)
tuscany/java/sca/samples/store-distributed/src/main/resources/nodeC/store.composite
(with props)
tuscany/java/sca/samples/store-distributed/src/main/resources/nodeC/uiservices/
tuscany/java/sca/samples/store-distributed/src/main/resources/nodeC/uiservices/store.html
(with props)
tuscany/java/sca/samples/store-distributed/workspace.xml (with props)
Removed:
tuscany/java/sca/samples/store-distributed/src/main/java/launch/
tuscany/java/sca/samples/store-distributed/src/main/resources/store.composite
Modified:
tuscany/java/sca/samples/pom.xml
tuscany/java/sca/samples/store-distributed/pom.xml
Modified: tuscany/java/sca/samples/pom.xml
URL:
http://svn.apache.org/viewvc/tuscany/java/sca/samples/pom.xml?rev=678649&r1=678648&r2=678649&view=diff
==============================================================================
--- tuscany/java/sca/samples/pom.xml (original)
+++ tuscany/java/sca/samples/pom.xml Mon Jul 21 22:47:08 2008
@@ -93,6 +93,7 @@
<module>simple-callback</module>
<module>simple-callback-ws</module>
<module>store</module>
+ <module>store-distributed</module>
<module>supplychain</module>
<module>web-resource</module>
</modules>
Propchange: tuscany/java/sca/samples/store-distributed/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Jul 21 22:47:08 2008
@@ -0,0 +1,16 @@
+target
+*.iws
+*.ipr
+*.iml
+.project
+.classpath
+maven.log
+velocity.log*
+junit*.properties
+surefire*.properties
+.settings
+.deployables
+.wtpmodules
+derby.log
+.externalToolBuilders
+maven-eclipse.xml
Propchange: tuscany/java/sca/samples/store-distributed/
------------------------------------------------------------------------------
svn:mergeinfo = /tuscany/branches/sca-java-1.3/samples/store:671193
Added: tuscany/java/sca/samples/store-distributed/cloud.composite
URL:
http://svn.apache.org/viewvc/tuscany/java/sca/samples/store-distributed/cloud.composite?rev=678649&view=auto
==============================================================================
--- tuscany/java/sca/samples/store-distributed/cloud.composite (added)
+++ tuscany/java/sca/samples/store-distributed/cloud.composite Mon Jul 21
22:47:08 2008
@@ -0,0 +1,27 @@
+<?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://store/cloud"/>
+ <include name="ns2:NodeB" uri="http://tuscany.apache.org/cloud"
xmlns:ns2="http://store/cloud"/>
+ <include name="ns2:NodeC" uri="http://tuscany.apache.org/cloud"
xmlns:ns2="http://store/cloud"/>
+</composite>
Propchange: tuscany/java/sca/samples/store-distributed/cloud.composite
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tuscany/java/sca/samples/store-distributed/cloud.composite
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: tuscany/java/sca/samples/store-distributed/cloud.composite
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: tuscany/java/sca/samples/store-distributed/domain.composite
URL:
http://svn.apache.org/viewvc/tuscany/java/sca/samples/store-distributed/domain.composite?rev=678649&view=auto
==============================================================================
--- tuscany/java/sca/samples/store-distributed/domain.composite (added)
+++ tuscany/java/sca/samples/store-distributed/domain.composite Mon Jul 21
22:47:08 2008
@@ -0,0 +1,27 @@
+<?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:storeA" uri="nodeA" xmlns:ns2="http://store"/>
+ <include name="ns2:storeB" uri="nodeB" xmlns:ns2="http://store"/>
+ <include name="ns2:storeC" uri="nodeC" xmlns:ns2="http://store"/>
+</composite>
Propchange: tuscany/java/sca/samples/store-distributed/domain.composite
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tuscany/java/sca/samples/store-distributed/domain.composite
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: tuscany/java/sca/samples/store-distributed/domain.composite
------------------------------------------------------------------------------
svn:mime-type = text/xml
Modified: tuscany/java/sca/samples/store-distributed/pom.xml
URL:
http://svn.apache.org/viewvc/tuscany/java/sca/samples/store-distributed/pom.xml?rev=678649&r1=678455&r2=678649&view=diff
==============================================================================
--- tuscany/java/sca/samples/store-distributed/pom.xml (original)
+++ tuscany/java/sca/samples/store-distributed/pom.xml Mon Jul 21 22:47:08 2008
@@ -25,7 +25,7 @@
<version>1.4-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
- <artifactId>sample-store</artifactId>
+ <artifactId>sample-store-distributed</artifactId>
<name>Apache Tuscany SCA Getting Started Online Store Sample</name>
<repositories>
@@ -36,11 +36,24 @@
</repositories>
<dependencies>
+
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-embedded</artifactId>
+ <artifactId>tuscany-node2-api</artifactId>
<version>1.4-SNAPSHOT</version>
- </dependency>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-node2-launcher</artifactId>
+ <version>1.4-SNAPSHOT</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-domain-manager</artifactId>
+ <version>1.4-SNAPSHOT</version>
+ </dependency>
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
Added:
tuscany/java/sca/samples/store-distributed/src/main/java/node/LaunchDomain.java
URL:
http://svn.apache.org/viewvc/tuscany/java/sca/samples/store-distributed/src/main/java/node/LaunchDomain.java?rev=678649&view=auto
==============================================================================
---
tuscany/java/sca/samples/store-distributed/src/main/java/node/LaunchDomain.java
(added)
+++
tuscany/java/sca/samples/store-distributed/src/main/java/node/LaunchDomain.java
Mon Jul 21 22:47:08 2008
@@ -0,0 +1,33 @@
+/*
+ * 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.
+ */
+package node;
+
+import org.apache.tuscany.sca.node.launcher.DomainManagerLauncher;
+
+/**
+ * This server program that loads a composite to provide simple registry
function.
+ * This server can be replaced with any registry that is appropriate but the
components
+ * in each node that talk to the registry should be replaced also.
+ */
+public class LaunchDomain {
+ public static void main(String[] args) throws Exception {
+ DomainManagerLauncher.main(args);
+ }
+
+}
Propchange:
tuscany/java/sca/samples/store-distributed/src/main/java/node/LaunchDomain.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
tuscany/java/sca/samples/store-distributed/src/main/java/node/LaunchDomain.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added:
tuscany/java/sca/samples/store-distributed/src/main/java/node/LaunchStoreNodeA.java
URL:
http://svn.apache.org/viewvc/tuscany/java/sca/samples/store-distributed/src/main/java/node/LaunchStoreNodeA.java?rev=678649&view=auto
==============================================================================
---
tuscany/java/sca/samples/store-distributed/src/main/java/node/LaunchStoreNodeA.java
(added)
+++
tuscany/java/sca/samples/store-distributed/src/main/java/node/LaunchStoreNodeA.java
Mon Jul 21 22:47:08 2008
@@ -0,0 +1,28 @@
+/*
+ * 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.
+ */
+
+package node;
+
+import org.apache.tuscany.sca.node.launcher.NodeLauncher;
+
+public class LaunchStoreNodeA {
+ public static void main(String[] args) throws Exception {
+ NodeLauncher.main(new String[]
{"http://localhost:9990/node-config/NodeA"});
+ }
+}
Propchange:
tuscany/java/sca/samples/store-distributed/src/main/java/node/LaunchStoreNodeA.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
tuscany/java/sca/samples/store-distributed/src/main/java/node/LaunchStoreNodeA.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added:
tuscany/java/sca/samples/store-distributed/src/main/java/node/LaunchStoreNodeB.java
URL:
http://svn.apache.org/viewvc/tuscany/java/sca/samples/store-distributed/src/main/java/node/LaunchStoreNodeB.java?rev=678649&view=auto
==============================================================================
---
tuscany/java/sca/samples/store-distributed/src/main/java/node/LaunchStoreNodeB.java
(added)
+++
tuscany/java/sca/samples/store-distributed/src/main/java/node/LaunchStoreNodeB.java
Mon Jul 21 22:47:08 2008
@@ -0,0 +1,28 @@
+/*
+ * 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.
+ */
+
+package node;
+
+import org.apache.tuscany.sca.node.launcher.NodeLauncher;
+
+public class LaunchStoreNodeB {
+ public static void main(String[] args) throws Exception {
+ NodeLauncher.main(new String[]
{"http://localhost:9990/node-config/NodeB"});
+ }
+}
Propchange:
tuscany/java/sca/samples/store-distributed/src/main/java/node/LaunchStoreNodeB.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
tuscany/java/sca/samples/store-distributed/src/main/java/node/LaunchStoreNodeB.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added:
tuscany/java/sca/samples/store-distributed/src/main/java/node/LaunchStoreNodeC.java
URL:
http://svn.apache.org/viewvc/tuscany/java/sca/samples/store-distributed/src/main/java/node/LaunchStoreNodeC.java?rev=678649&view=auto
==============================================================================
---
tuscany/java/sca/samples/store-distributed/src/main/java/node/LaunchStoreNodeC.java
(added)
+++
tuscany/java/sca/samples/store-distributed/src/main/java/node/LaunchStoreNodeC.java
Mon Jul 21 22:47:08 2008
@@ -0,0 +1,28 @@
+/*
+ * 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.
+ */
+
+package node;
+
+import org.apache.tuscany.sca.node.launcher.NodeLauncher;
+
+public class LaunchStoreNodeC {
+ public static void main(String[] args) throws Exception {
+ NodeLauncher.main(new String[]
{"http://localhost:9990/node-config/NodeC"});
+ }
+}
Propchange:
tuscany/java/sca/samples/store-distributed/src/main/java/node/LaunchStoreNodeC.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
tuscany/java/sca/samples/store-distributed/src/main/java/node/LaunchStoreNodeC.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added:
tuscany/java/sca/samples/store-distributed/src/main/resources/cloud/NodeA.composite
URL:
http://svn.apache.org/viewvc/tuscany/java/sca/samples/store-distributed/src/main/resources/cloud/NodeA.composite?rev=678649&view=auto
==============================================================================
---
tuscany/java/sca/samples/store-distributed/src/main/resources/cloud/NodeA.composite
(added)
+++
tuscany/java/sca/samples/store-distributed/src/main/resources/cloud/NodeA.composite
Mon Jul 21 22:47:08 2008
@@ -0,0 +1,36 @@
+<?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 xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ xmlns:t="http://tuscany.apache.org/xmlns/sca/1.0"
+ targetNamespace="http://store/cloud"
+ xmlns:store="http://store"
+ name="NodeA">
+
+ <component name="NodeA">
+ <t:implementation.node uri="nodeA" composite="store:storeA"/>
+ <service name="Node">
+ <binding.sca uri="http://localhost:8100"/>
+ <t:binding.jsonrpc uri="http://localhost:8100"/>
+ <t:binding.atom uri="http://localhost:8100"/>
+ <t:binding.http uri="http://localhost:8100"/>
+ </service>
+ </component>
+
+</composite>
Propchange:
tuscany/java/sca/samples/store-distributed/src/main/resources/cloud/NodeA.composite
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
tuscany/java/sca/samples/store-distributed/src/main/resources/cloud/NodeA.composite
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange:
tuscany/java/sca/samples/store-distributed/src/main/resources/cloud/NodeA.composite
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added:
tuscany/java/sca/samples/store-distributed/src/main/resources/cloud/NodeB.composite
URL:
http://svn.apache.org/viewvc/tuscany/java/sca/samples/store-distributed/src/main/resources/cloud/NodeB.composite?rev=678649&view=auto
==============================================================================
---
tuscany/java/sca/samples/store-distributed/src/main/resources/cloud/NodeB.composite
(added)
+++
tuscany/java/sca/samples/store-distributed/src/main/resources/cloud/NodeB.composite
Mon Jul 21 22:47:08 2008
@@ -0,0 +1,36 @@
+<?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 xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ xmlns:t="http://tuscany.apache.org/xmlns/sca/1.0"
+ targetNamespace="http://store/cloud"
+ xmlns:store="http://store"
+ name="NodeB">
+
+ <component name="NodeB">
+ <t:implementation.node uri="nodeB" composite="store:storeB"/>
+ <service name="Node">
+ <binding.sca uri="http://localhost:8200"/>
+ <t:binding.jsonrpc uri="http://localhost:8200"/>
+ <t:binding.atom uri="http://localhost:8200"/>
+ <t:binding.http uri="http://localhost:8200"/>
+ </service>
+ </component>
+
+</composite>
Propchange:
tuscany/java/sca/samples/store-distributed/src/main/resources/cloud/NodeB.composite
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
tuscany/java/sca/samples/store-distributed/src/main/resources/cloud/NodeB.composite
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange:
tuscany/java/sca/samples/store-distributed/src/main/resources/cloud/NodeB.composite
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added:
tuscany/java/sca/samples/store-distributed/src/main/resources/cloud/NodeC.composite
URL:
http://svn.apache.org/viewvc/tuscany/java/sca/samples/store-distributed/src/main/resources/cloud/NodeC.composite?rev=678649&view=auto
==============================================================================
---
tuscany/java/sca/samples/store-distributed/src/main/resources/cloud/NodeC.composite
(added)
+++
tuscany/java/sca/samples/store-distributed/src/main/resources/cloud/NodeC.composite
Mon Jul 21 22:47:08 2008
@@ -0,0 +1,36 @@
+<?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 xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ xmlns:t="http://tuscany.apache.org/xmlns/sca/1.0"
+ targetNamespace="http://store/cloud"
+ xmlns:store="http://store"
+ name="NodeC">
+
+ <component name="NodeC">
+ <t:implementation.node uri="nodeC" composite="store:storeC"/>
+ <service name="Node">
+ <binding.sca uri="http://localhost:8300"/>
+ <t:binding.jsonrpc uri="http://localhost:8300"/>
+ <t:binding.atom uri="http://localhost:8300"/>
+ <t:binding.http uri="http://localhost:8300"/>
+ </service>
+ </component>
+
+</composite>
Propchange:
tuscany/java/sca/samples/store-distributed/src/main/resources/cloud/NodeC.composite
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
tuscany/java/sca/samples/store-distributed/src/main/resources/cloud/NodeC.composite
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange:
tuscany/java/sca/samples/store-distributed/src/main/resources/cloud/NodeC.composite
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added:
tuscany/java/sca/samples/store-distributed/src/main/resources/nodeA/META-INF/sca-contribution.xml
URL:
http://svn.apache.org/viewvc/tuscany/java/sca/samples/store-distributed/src/main/resources/nodeA/META-INF/sca-contribution.xml?rev=678649&view=auto
==============================================================================
---
tuscany/java/sca/samples/store-distributed/src/main/resources/nodeA/META-INF/sca-contribution.xml
(added)
+++
tuscany/java/sca/samples/store-distributed/src/main/resources/nodeA/META-INF/sca-contribution.xml
Mon Jul 21 22:47:08 2008
@@ -0,0 +1,24 @@
+<?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.
+-->
+<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://store"
+ xmlns:store="http://store">
+ <deployable composite="store:storeA"/>
+</contribution>
\ No newline at end of file
Propchange:
tuscany/java/sca/samples/store-distributed/src/main/resources/nodeA/META-INF/sca-contribution.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
tuscany/java/sca/samples/store-distributed/src/main/resources/nodeA/META-INF/sca-contribution.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange:
tuscany/java/sca/samples/store-distributed/src/main/resources/nodeA/META-INF/sca-contribution.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added:
tuscany/java/sca/samples/store-distributed/src/main/resources/nodeA/store.composite
URL:
http://svn.apache.org/viewvc/tuscany/java/sca/samples/store-distributed/src/main/resources/nodeA/store.composite?rev=678649&view=auto
==============================================================================
---
tuscany/java/sca/samples/store-distributed/src/main/resources/nodeA/store.composite
(added)
+++
tuscany/java/sca/samples/store-distributed/src/main/resources/nodeA/store.composite
Mon Jul 21 22:47:08 2008
@@ -0,0 +1,38 @@
+<?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 xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ xmlns:t="http://tuscany.apache.org/xmlns/sca/1.0"
+ targetNamespace="http://store"
+ name="storeA">
+
+ <component name="Catalog">
+ <implementation.java class="services.FruitsCatalogImpl"/>
+ <property name="currencyCode">USD</property>
+ <service name="Catalog">
+ <t:binding.jsonrpc/>
+ </service>
+ <reference name="currencyConverter"
target="CurrencyConverter"/>
+ </component>
+
+ <component name="CurrencyConverter">
+ <implementation.java class="services.CurrencyConverterImpl"/>
+ </component>
+
+</composite>
Propchange:
tuscany/java/sca/samples/store-distributed/src/main/resources/nodeA/store.composite
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange:
tuscany/java/sca/samples/store-distributed/src/main/resources/nodeA/store.composite
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added:
tuscany/java/sca/samples/store-distributed/src/main/resources/nodeB/META-INF/sca-contribution.xml
URL:
http://svn.apache.org/viewvc/tuscany/java/sca/samples/store-distributed/src/main/resources/nodeB/META-INF/sca-contribution.xml?rev=678649&view=auto
==============================================================================
---
tuscany/java/sca/samples/store-distributed/src/main/resources/nodeB/META-INF/sca-contribution.xml
(added)
+++
tuscany/java/sca/samples/store-distributed/src/main/resources/nodeB/META-INF/sca-contribution.xml
Mon Jul 21 22:47:08 2008
@@ -0,0 +1,24 @@
+<?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.
+-->
+<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://store"
+ xmlns:store="http://store">
+ <deployable composite="store:storeB"/>
+</contribution>
\ No newline at end of file
Propchange:
tuscany/java/sca/samples/store-distributed/src/main/resources/nodeB/META-INF/sca-contribution.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
tuscany/java/sca/samples/store-distributed/src/main/resources/nodeB/META-INF/sca-contribution.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange:
tuscany/java/sca/samples/store-distributed/src/main/resources/nodeB/META-INF/sca-contribution.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added:
tuscany/java/sca/samples/store-distributed/src/main/resources/nodeB/store.composite
URL:
http://svn.apache.org/viewvc/tuscany/java/sca/samples/store-distributed/src/main/resources/nodeB/store.composite?rev=678649&view=auto
==============================================================================
---
tuscany/java/sca/samples/store-distributed/src/main/resources/nodeB/store.composite
(added)
+++
tuscany/java/sca/samples/store-distributed/src/main/resources/nodeB/store.composite
Mon Jul 21 22:47:08 2008
@@ -0,0 +1,35 @@
+<?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 xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ xmlns:t="http://tuscany.apache.org/xmlns/sca/1.0"
+ targetNamespace="http://store"
+ name="storeB">
+
+ <component name="ShoppingCart">
+ <implementation.java class="services.ShoppingCartImpl"/>
+ <service name="Cart">
+ <t:binding.atom uri="/ShoppingCart/Cart"/>
+ </service>
+ <service name="Total">
+ <t:binding.jsonrpc/>
+ </service>
+ </component>
+
+</composite>
Propchange:
tuscany/java/sca/samples/store-distributed/src/main/resources/nodeB/store.composite
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange:
tuscany/java/sca/samples/store-distributed/src/main/resources/nodeB/store.composite
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added:
tuscany/java/sca/samples/store-distributed/src/main/resources/nodeC/META-INF/sca-contribution.xml
URL:
http://svn.apache.org/viewvc/tuscany/java/sca/samples/store-distributed/src/main/resources/nodeC/META-INF/sca-contribution.xml?rev=678649&view=auto
==============================================================================
---
tuscany/java/sca/samples/store-distributed/src/main/resources/nodeC/META-INF/sca-contribution.xml
(added)
+++
tuscany/java/sca/samples/store-distributed/src/main/resources/nodeC/META-INF/sca-contribution.xml
Mon Jul 21 22:47:08 2008
@@ -0,0 +1,24 @@
+<?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.
+-->
+<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://store"
+ xmlns:store="http://store">
+ <deployable composite="store:storeC"/>
+</contribution>
\ No newline at end of file
Propchange:
tuscany/java/sca/samples/store-distributed/src/main/resources/nodeC/META-INF/sca-contribution.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
tuscany/java/sca/samples/store-distributed/src/main/resources/nodeC/META-INF/sca-contribution.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange:
tuscany/java/sca/samples/store-distributed/src/main/resources/nodeC/META-INF/sca-contribution.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added:
tuscany/java/sca/samples/store-distributed/src/main/resources/nodeC/store.composite
URL:
http://svn.apache.org/viewvc/tuscany/java/sca/samples/store-distributed/src/main/resources/nodeC/store.composite?rev=678649&view=auto
==============================================================================
---
tuscany/java/sca/samples/store-distributed/src/main/resources/nodeC/store.composite
(added)
+++
tuscany/java/sca/samples/store-distributed/src/main/resources/nodeC/store.composite
Mon Jul 21 22:47:08 2008
@@ -0,0 +1,41 @@
+<?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 xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ xmlns:t="http://tuscany.apache.org/xmlns/sca/1.0"
+ targetNamespace="http://store"
+ name="storeC">
+
+ <component name="Store">
+ <t:implementation.widget location="uiservices/store.html"/>
+ <service name="Widget">
+ <t:binding.http uri="/store"/>
+ </service>
+ <reference name="catalog" target="Catalog">
+ <t:binding.jsonrpc/>
+ </reference>
+ <reference name="shoppingCart" target="ShoppingCart/Cart">
+ <t:binding.atom/>
+ </reference>
+ <reference name="shoppingTotal" target="ShoppingCart/Total">
+ <t:binding.jsonrpc/>
+ </reference>
+ </component>
+</composite>
+
Propchange:
tuscany/java/sca/samples/store-distributed/src/main/resources/nodeC/store.composite
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
tuscany/java/sca/samples/store-distributed/src/main/resources/nodeC/store.composite
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange:
tuscany/java/sca/samples/store-distributed/src/main/resources/nodeC/store.composite
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added:
tuscany/java/sca/samples/store-distributed/src/main/resources/nodeC/uiservices/store.html
URL:
http://svn.apache.org/viewvc/tuscany/java/sca/samples/store-distributed/src/main/resources/nodeC/uiservices/store.html?rev=678649&view=auto
==============================================================================
---
tuscany/java/sca/samples/store-distributed/src/main/resources/nodeC/uiservices/store.html
(added)
+++
tuscany/java/sca/samples/store-distributed/src/main/resources/nodeC/uiservices/store.html
Mon Jul 21 22:47:08 2008
@@ -0,0 +1,162 @@
+<!--
+ * 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.
+-->
+<html>
+<head>
+<title>Store</title>
+
+<script type="text/javascript" src="store.js"></script>
+
+<script language="JavaScript">
+
+ //@Reference
+ var catalog = new Reference("catalog");
+
+ //@Reference
+ var shoppingCart = new Reference("shoppingCart");
+
+ //@Reference
+ var shoppingTotal = new Reference("shoppingTotal");
+
+ var catalogItems;
+
+ function catalog_getResponse(items,exception) {
+ if(exception){
+ alert(exception.message);
+ return;
+ }
+ var catalog = "";
+
+ for (var i=0; i<items.length; i++) {
+ var item = items[i].name + ' - ' +
items[i].price;
+ catalog += '<input name="items" type="checkbox"
value="' +
+ item + '">' + item + '
<br>';
+ }
+ document.getElementById('catalog').innerHTML=catalog;
+ catalogItems = items;
+ }
+
+ function shoppingCart_getResponse(feed) {
+ if (feed != null) {
+ var entries = feed.getElementsByTagName("entry");
+ var list = "";
+ for (var i=0; i<entries.length; i++) {
+ var content =
entries[i].getElementsByTagName("content")[0];
+ var name =
content.getElementsByTagName("name")[0].firstChild.nodeValue;
+ var price =
content.getElementsByTagName("price")[0].firstChild.nodeValue;
+ list += name + ' - ' + price + ' <br>';
+ }
+ document.getElementById("shoppingCart").innerHTML =
list;
+
+ if (entries.length != 0) {
+ try {
+
shoppingTotal.getTotal(shoppingTotal_getTotalResponse);
+ }
+ catch(e){
+ alert(e);
+ }
+ }
+ }
+ }
+
+ function shoppingTotal_getTotalResponse(total,exception) {
+ if(exception) {
+ alert(exception.message);
+ return;
+ }
+ document.getElementById('total').innerHTML = total;
+ }
+
+ function shoppingCart_postResponse(entry) {
+ shoppingCart.get("", shoppingCart_getResponse);
+ }
+
+ function addToCart() {
+ var items = document.catalogForm.items;
+ var j = 0;
+ for (var i=0; i<items.length; i++)
+ if (items[i].checked) {
+
+ var entry = '<entry
xmlns="http://www.w3.org/2005/Atom"><title>item</title><content
type="text/xml">' +
+ '<Item xmlns="http://services/">' +
+ '<name xmlns="">' + catalogItems[i].name + '</name>' +
'<price xmlns="">' + catalogItems[i].price + '</price>' +
+ '</Item>' + '</content></entry>';
+ shoppingCart.post(entry,
shoppingCart_postResponse);
+ items[i].checked = false;
+ }
+ }
+ function checkoutCart() {
+ document.getElementById('store').innerHTML='<h2>' +
+ 'Thanks for Shopping With Us!</h2>'+
+ '<h2>Your Order</h2>'+
+ '<form name="orderForm">'+
+
document.getElementById('shoppingCart').innerHTML+
+ '<br>'+
+
document.getElementById('total').innerHTML+
+ '<br>'+
+ '<br>'+
+ '<input type="submit" value="Continue
Shopping">'+
+ '</form>';
+ shoppingCart.del("", null);
+ }
+ function deleteCart() {
+ shoppingCart.del("", null);
+ document.getElementById('shoppingCart').innerHTML = "";
+ document.getElementById('total').innerHTML = "";
+ }
+
+ function init() {
+
+ try {
+ catalog.get(catalog_getResponse);
+ shoppingCart.get("", shoppingCart_getResponse);
+ }
+ catch(e){
+ alert(e);
+ }
+ }
+
+</script>
+
+</head>
+
+<body onload="init()">
+<h1>Store</h1>
+ <div id="store">
+ <h2>Catalog</h2>
+ <form name="catalogForm">
+ <div id="catalog" ></div>
+ <br>
+ <input type="button" onClick="addToCart()" value="Add to Cart">
+ </form>
+
+ <br>
+
+ <h2>Your Shopping Cart</h2>
+ <form name="shoppingCartForm">
+ <div id="shoppingCart"></div>
+ <br>
+ <div id="total"></div>
+ <br>
+ <input type="button" onClick="checkoutCart()" value="Checkout">
+ <input type="button" onClick="deleteCart()" value="Empty">
+ <a href="../ShoppingCart/Cart/">(feed)</a>
+ </form>
+ </div>
+</body>
+</html>
Propchange:
tuscany/java/sca/samples/store-distributed/src/main/resources/nodeC/uiservices/store.html
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
tuscany/java/sca/samples/store-distributed/src/main/resources/nodeC/uiservices/store.html
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange:
tuscany/java/sca/samples/store-distributed/src/main/resources/nodeC/uiservices/store.html
------------------------------------------------------------------------------
svn:mime-type = text/html
Added: tuscany/java/sca/samples/store-distributed/workspace.xml
URL:
http://svn.apache.org/viewvc/tuscany/java/sca/samples/store-distributed/workspace.xml?rev=678649&view=auto
==============================================================================
--- tuscany/java/sca/samples/store-distributed/workspace.xml (added)
+++ tuscany/java/sca/samples/store-distributed/workspace.xml Mon Jul 21
22:47:08 2008
@@ -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:./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"/>
+</workspace>
Propchange: tuscany/java/sca/samples/store-distributed/workspace.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tuscany/java/sca/samples/store-distributed/workspace.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: tuscany/java/sca/samples/store-distributed/workspace.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml