You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by an...@apache.org on 2009/05/27 15:07:51 UTC
svn commit: r779154 - in /tuscany/java/sca/itest/nodes: ./
helloworld-client/ helloworld-client/src/ helloworld-client/src/main/
helloworld-client/src/main/java/ helloworld-client/src/main/java/itest/
helloworld-client/src/main/java/itest/nodes/ hellow...
Author: antelder
Date: Wed May 27 13:07:49 2009
New Revision: 779154
URL: http://svn.apache.org/viewvc?rev=779154&view=rev
Log:
Start of an itest for using multiple nodes in a domain. So far this has two nodes each with a component, one with a reference to the service in the other node, and a test that starts the nodes and invokes the client component. Doesn't work as there isn't yet any mechanisim for the nodes to know about each others services
Added:
tuscany/java/sca/itest/nodes/ (with props)
tuscany/java/sca/itest/nodes/helloworld-client/ (with props)
tuscany/java/sca/itest/nodes/helloworld-client/pom.xml
tuscany/java/sca/itest/nodes/helloworld-client/src/
tuscany/java/sca/itest/nodes/helloworld-client/src/main/
tuscany/java/sca/itest/nodes/helloworld-client/src/main/java/
tuscany/java/sca/itest/nodes/helloworld-client/src/main/java/itest/
tuscany/java/sca/itest/nodes/helloworld-client/src/main/java/itest/nodes/
tuscany/java/sca/itest/nodes/helloworld-client/src/main/java/itest/nodes/HelloworldImpl.java
tuscany/java/sca/itest/nodes/helloworld-client/src/main/resources/
tuscany/java/sca/itest/nodes/helloworld-client/src/main/resources/META-INF/
tuscany/java/sca/itest/nodes/helloworld-client/src/main/resources/META-INF/sca-contribution.xml
tuscany/java/sca/itest/nodes/helloworld-client/src/main/resources/helloworld-client.composite
tuscany/java/sca/itest/nodes/helloworld-iface/ (with props)
tuscany/java/sca/itest/nodes/helloworld-iface/pom.xml
tuscany/java/sca/itest/nodes/helloworld-iface/src/
tuscany/java/sca/itest/nodes/helloworld-iface/src/main/
tuscany/java/sca/itest/nodes/helloworld-iface/src/main/java/
tuscany/java/sca/itest/nodes/helloworld-iface/src/main/java/itest/
tuscany/java/sca/itest/nodes/helloworld-iface/src/main/java/itest/nodes/
tuscany/java/sca/itest/nodes/helloworld-iface/src/main/java/itest/nodes/Helloworld.java
tuscany/java/sca/itest/nodes/helloworld-iface/src/main/resources/
tuscany/java/sca/itest/nodes/helloworld-service/ (with props)
tuscany/java/sca/itest/nodes/helloworld-service/pom.xml
tuscany/java/sca/itest/nodes/helloworld-service/src/
tuscany/java/sca/itest/nodes/helloworld-service/src/main/
tuscany/java/sca/itest/nodes/helloworld-service/src/main/java/
tuscany/java/sca/itest/nodes/helloworld-service/src/main/java/itest/
tuscany/java/sca/itest/nodes/helloworld-service/src/main/java/itest/nodes/
tuscany/java/sca/itest/nodes/helloworld-service/src/main/java/itest/nodes/HelloworldImpl.java
tuscany/java/sca/itest/nodes/helloworld-service/src/main/resources/
tuscany/java/sca/itest/nodes/helloworld-service/src/main/resources/META-INF/
tuscany/java/sca/itest/nodes/helloworld-service/src/main/resources/META-INF/sca-contribution.xml
tuscany/java/sca/itest/nodes/helloworld-service/src/main/resources/helloworld-service.composite
tuscany/java/sca/itest/nodes/pom.xml
tuscany/java/sca/itest/nodes/two-nodes-test/ (with props)
tuscany/java/sca/itest/nodes/two-nodes-test/pom.xml
tuscany/java/sca/itest/nodes/two-nodes-test/src/
tuscany/java/sca/itest/nodes/two-nodes-test/src/test/
tuscany/java/sca/itest/nodes/two-nodes-test/src/test/java/
tuscany/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/
tuscany/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/TwoNodesTestCase.java
Propchange: tuscany/java/sca/itest/nodes/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed May 27 13:07:49 2009
@@ -0,0 +1,20 @@
+target
+work
+dojo
+*.iws
+*.ipr
+*.iml
+derby.log
+maven.log
+maven-eclipse.xml
+build.xml
+build-dependency.xml
+velocity.log*
+junit*.properties
+surefire*.properties
+.project
+.classpath
+.settings
+.deployables
+.wtpmodules
+.externalToolBuilders
Propchange: tuscany/java/sca/itest/nodes/helloworld-client/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed May 27 13:07:49 2009
@@ -0,0 +1,20 @@
+target
+work
+dojo
+*.iws
+*.ipr
+*.iml
+derby.log
+maven.log
+maven-eclipse.xml
+build.xml
+build-dependency.xml
+velocity.log*
+junit*.properties
+surefire*.properties
+.project
+.classpath
+.settings
+.deployables
+.wtpmodules
+.externalToolBuilders
Added: tuscany/java/sca/itest/nodes/helloworld-client/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/nodes/helloworld-client/pom.xml?rev=779154&view=auto
==============================================================================
--- tuscany/java/sca/itest/nodes/helloworld-client/pom.xml (added)
+++ tuscany/java/sca/itest/nodes/helloworld-client/pom.xml Wed May 27 13:07:49 2009
@@ -0,0 +1,44 @@
+<?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.
+-->
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-itest</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-nodes-helloworld-client</artifactId>
+ <name>Apache Tuscany SCA iTest Nodes Helloworld Client</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-nodes-helloworld-iface</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca-api</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+</project>
Added: tuscany/java/sca/itest/nodes/helloworld-client/src/main/java/itest/nodes/HelloworldImpl.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/nodes/helloworld-client/src/main/java/itest/nodes/HelloworldImpl.java?rev=779154&view=auto
==============================================================================
--- tuscany/java/sca/itest/nodes/helloworld-client/src/main/java/itest/nodes/HelloworldImpl.java (added)
+++ tuscany/java/sca/itest/nodes/helloworld-client/src/main/java/itest/nodes/HelloworldImpl.java Wed May 27 13:07:49 2009
@@ -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 itest.nodes;
+
+import org.oasisopen.sca.annotation.Reference;
+
+public class HelloworldImpl implements Helloworld {
+
+ @Reference
+ public Helloworld service;
+
+ public String sayHello(String name) {
+ return "Hi " + service.sayHello(name);
+ }
+
+}
Added: tuscany/java/sca/itest/nodes/helloworld-client/src/main/resources/META-INF/sca-contribution.xml
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/nodes/helloworld-client/src/main/resources/META-INF/sca-contribution.xml?rev=779154&view=auto
==============================================================================
--- tuscany/java/sca/itest/nodes/helloworld-client/src/main/resources/META-INF/sca-contribution.xml (added)
+++ tuscany/java/sca/itest/nodes/helloworld-client/src/main/resources/META-INF/sca-contribution.xml Wed May 27 13:07:49 2009
@@ -0,0 +1,23 @@
+<?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://docs.oasis-open.org/ns/opencsa/sca/200903"
+ xmlns:itest="http://itest">
+ <deployable composite="itest:HelloworldClient"/>
+</contribution>
\ No newline at end of file
Added: tuscany/java/sca/itest/nodes/helloworld-client/src/main/resources/helloworld-client.composite
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/nodes/helloworld-client/src/main/resources/helloworld-client.composite?rev=779154&view=auto
==============================================================================
--- tuscany/java/sca/itest/nodes/helloworld-client/src/main/resources/helloworld-client.composite (added)
+++ tuscany/java/sca/itest/nodes/helloworld-client/src/main/resources/helloworld-client.composite Wed May 27 13:07:49 2009
@@ -0,0 +1,29 @@
+<?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://docs.oasis-open.org/ns/opencsa/sca/200903"
+ targetNamespace="http://itest"
+ name="HelloworldClient">
+
+ <component name="HelloworldClient">
+ <implementation.java class="itest.nodes.HelloworldImpl"/>
+ <reference name="service" target="HelloworldService"/>
+ </component>
+
+</composite>
Propchange: tuscany/java/sca/itest/nodes/helloworld-iface/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed May 27 13:07:49 2009
@@ -0,0 +1,20 @@
+target
+work
+dojo
+*.iws
+*.ipr
+*.iml
+derby.log
+maven.log
+maven-eclipse.xml
+build.xml
+build-dependency.xml
+velocity.log*
+junit*.properties
+surefire*.properties
+.project
+.classpath
+.settings
+.deployables
+.wtpmodules
+.externalToolBuilders
Added: tuscany/java/sca/itest/nodes/helloworld-iface/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/nodes/helloworld-iface/pom.xml?rev=779154&view=auto
==============================================================================
--- tuscany/java/sca/itest/nodes/helloworld-iface/pom.xml (added)
+++ tuscany/java/sca/itest/nodes/helloworld-iface/pom.xml Wed May 27 13:07:49 2009
@@ -0,0 +1,39 @@
+<?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.
+-->
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-itest</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-nodes-helloworld-iface</artifactId>
+ <name>Apache Tuscany SCA iTest Nodes Helloworld IFaces</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca-api</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+</project>
Added: tuscany/java/sca/itest/nodes/helloworld-iface/src/main/java/itest/nodes/Helloworld.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/nodes/helloworld-iface/src/main/java/itest/nodes/Helloworld.java?rev=779154&view=auto
==============================================================================
--- tuscany/java/sca/itest/nodes/helloworld-iface/src/main/java/itest/nodes/Helloworld.java (added)
+++ tuscany/java/sca/itest/nodes/helloworld-iface/src/main/java/itest/nodes/Helloworld.java Wed May 27 13:07:49 2009
@@ -0,0 +1,26 @@
+/*
+ * 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 itest.nodes;
+
+public interface Helloworld {
+
+ String sayHello(String name);
+
+}
Propchange: tuscany/java/sca/itest/nodes/helloworld-service/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed May 27 13:07:49 2009
@@ -0,0 +1,20 @@
+target
+work
+dojo
+*.iws
+*.ipr
+*.iml
+derby.log
+maven.log
+maven-eclipse.xml
+build.xml
+build-dependency.xml
+velocity.log*
+junit*.properties
+surefire*.properties
+.project
+.classpath
+.settings
+.deployables
+.wtpmodules
+.externalToolBuilders
Added: tuscany/java/sca/itest/nodes/helloworld-service/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/nodes/helloworld-service/pom.xml?rev=779154&view=auto
==============================================================================
--- tuscany/java/sca/itest/nodes/helloworld-service/pom.xml (added)
+++ tuscany/java/sca/itest/nodes/helloworld-service/pom.xml Wed May 27 13:07:49 2009
@@ -0,0 +1,49 @@
+<?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.
+-->
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-itest</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-nodes-helloworld-service</artifactId>
+ <name>Apache Tuscany SCA iTest Nodes Helloworld Service</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-nodes-helloworld-iface</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca-api</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca-api</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+</project>
Added: tuscany/java/sca/itest/nodes/helloworld-service/src/main/java/itest/nodes/HelloworldImpl.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/nodes/helloworld-service/src/main/java/itest/nodes/HelloworldImpl.java?rev=779154&view=auto
==============================================================================
--- tuscany/java/sca/itest/nodes/helloworld-service/src/main/java/itest/nodes/HelloworldImpl.java (added)
+++ tuscany/java/sca/itest/nodes/helloworld-service/src/main/java/itest/nodes/HelloworldImpl.java Wed May 27 13:07:49 2009
@@ -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 itest.nodes;
+
+public class HelloworldImpl implements Helloworld {
+
+ public String sayHello(String name) {
+ return "Hello " + name;
+ }
+
+}
Added: tuscany/java/sca/itest/nodes/helloworld-service/src/main/resources/META-INF/sca-contribution.xml
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/nodes/helloworld-service/src/main/resources/META-INF/sca-contribution.xml?rev=779154&view=auto
==============================================================================
--- tuscany/java/sca/itest/nodes/helloworld-service/src/main/resources/META-INF/sca-contribution.xml (added)
+++ tuscany/java/sca/itest/nodes/helloworld-service/src/main/resources/META-INF/sca-contribution.xml Wed May 27 13:07:49 2009
@@ -0,0 +1,23 @@
+<?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://docs.oasis-open.org/ns/opencsa/sca/200903"
+ xmlns:itest="http://itest">
+ <deployable composite="itest:HelloworldService"/>
+</contribution>
\ No newline at end of file
Added: tuscany/java/sca/itest/nodes/helloworld-service/src/main/resources/helloworld-service.composite
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/nodes/helloworld-service/src/main/resources/helloworld-service.composite?rev=779154&view=auto
==============================================================================
--- tuscany/java/sca/itest/nodes/helloworld-service/src/main/resources/helloworld-service.composite (added)
+++ tuscany/java/sca/itest/nodes/helloworld-service/src/main/resources/helloworld-service.composite Wed May 27 13:07:49 2009
@@ -0,0 +1,28 @@
+<?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://docs.oasis-open.org/ns/opencsa/sca/200903"
+ targetNamespace="http://itest"
+ name="HelloworldService">
+
+ <component name="HelloworldService">
+ <implementation.java class="itest.nodes.HelloworldImpl"/>
+ </component>
+
+</composite>
Added: tuscany/java/sca/itest/nodes/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/nodes/pom.xml?rev=779154&view=auto
==============================================================================
--- tuscany/java/sca/itest/nodes/pom.xml (added)
+++ tuscany/java/sca/itest/nodes/pom.xml Wed May 27 13:07:49 2009
@@ -0,0 +1,43 @@
+<?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.
+-->
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-itest</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <packaging>pom</packaging>
+ <artifactId>itest-nodes</artifactId>
+ <name>Apache Tuscany SCA Nodes Integration Tests</name>
+
+ <build>
+ <defaultGoal>install</defaultGoal>
+ </build>
+
+ <modules>
+ <module>helloworld-iface</module>
+ <module>helloworld-service</module>
+ <module>helloworld-client</module>
+ <module>two-nodes-test</module>
+ </modules>
+
+</project>
Propchange: tuscany/java/sca/itest/nodes/two-nodes-test/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed May 27 13:07:49 2009
@@ -0,0 +1,20 @@
+target
+work
+dojo
+*.iws
+*.ipr
+*.iml
+derby.log
+maven.log
+maven-eclipse.xml
+build.xml
+build-dependency.xml
+velocity.log*
+junit*.properties
+surefire*.properties
+.project
+.classpath
+.settings
+.deployables
+.wtpmodules
+.externalToolBuilders
Added: tuscany/java/sca/itest/nodes/two-nodes-test/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/nodes/two-nodes-test/pom.xml?rev=779154&view=auto
==============================================================================
--- tuscany/java/sca/itest/nodes/two-nodes-test/pom.xml (added)
+++ tuscany/java/sca/itest/nodes/two-nodes-test/pom.xml Wed May 27 13:07:49 2009
@@ -0,0 +1,48 @@
+<?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.
+-->
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-itest</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-nodes-two-nodes-test</artifactId>
+ <name>Apache Tuscany SCA iTest Nodes Two Nodes Test</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-nodes-helloworld-iface</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-node-impl</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-java-runtime</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+</project>
Added: tuscany/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/TwoNodesTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/TwoNodesTestCase.java?rev=779154&view=auto
==============================================================================
--- tuscany/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/TwoNodesTestCase.java (added)
+++ tuscany/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/TwoNodesTestCase.java Wed May 27 13:07:49 2009
@@ -0,0 +1,74 @@
+/*
+ * 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 itest;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import itest.nodes.Helloworld;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class TwoNodesTestCase{
+
+ private static Node serviceNode;
+ private static Node clientNode;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ System.setProperty("org.apache.tuscany.sca.contribution.processor.ValidationSchemaExtensionPoint.enabled", "false");
+ NodeFactory factory = NodeFactory.newInstance();
+ serviceNode = factory.createNode(new Contribution("service", "..\\helloworld-service\\target\\itest-nodes-helloworld-service-2.0-SNAPSHOT.jar"));
+ serviceNode.start();
+ clientNode = factory.createNode(new Contribution("client", "..\\helloworld-client\\target\\itest-nodes-helloworld-client-2.0-SNAPSHOT.jar"));
+ clientNode.start();
+ }
+
+ @Test
+ public void testCalculator() throws Exception {
+
+ // Ideally this would use the SCAClient API but leaving that tillwe have the basics working
+
+ Helloworld service = serviceNode.getService(Helloworld.class, "HelloworldService");
+ assertNotNull(service);
+ assertEquals("Hello Petra", service.sayHello("Petra"));
+
+ Helloworld client = clientNode.getService(Helloworld.class, "HelloworldClient");
+ assertNotNull(client);
+ assertEquals("Hi Hello Petra", client.sayHello("Petra"));
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (serviceNode != null) {
+ serviceNode.stop();
+ }
+ if (clientNode != null) {
+ clientNode.stop();
+ }
+ }
+}