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 2010/01/29 15:08:44 UTC

svn commit: r904504 - in /tuscany/sca-java-2.x/trunk: itest/nodes/ itest/nodes/one-jvm-tribes/ itest/nodes/one-jvm-tribes/src/ itest/nodes/one-jvm-tribes/src/main/ itest/nodes/one-jvm-tribes/src/main/java/ itest/nodes/one-jvm-tribes/src/test/ itest/nod...

Author: antelder
Date: Fri Jan 29 14:08:43 2010
New Revision: 904504

URL: http://svn.apache.org/viewvc?rev=904504&view=rev
Log:
Update tribes registry to also support the tuscany registry uri format

Added:
    tuscany/sca-java-2.x/trunk/itest/nodes/one-jvm-tribes/   (with props)
    tuscany/sca-java-2.x/trunk/itest/nodes/one-jvm-tribes/pom.xml
    tuscany/sca-java-2.x/trunk/itest/nodes/one-jvm-tribes/src/
    tuscany/sca-java-2.x/trunk/itest/nodes/one-jvm-tribes/src/main/
    tuscany/sca-java-2.x/trunk/itest/nodes/one-jvm-tribes/src/main/java/
    tuscany/sca-java-2.x/trunk/itest/nodes/one-jvm-tribes/src/test/
    tuscany/sca-java-2.x/trunk/itest/nodes/one-jvm-tribes/src/test/java/
    tuscany/sca-java-2.x/trunk/itest/nodes/one-jvm-tribes/src/test/java/itest/
    tuscany/sca-java-2.x/trunk/itest/nodes/one-jvm-tribes/src/test/java/itest/OneNodeTestCase.java
    tuscany/sca-java-2.x/trunk/itest/nodes/one-jvm-tribes/src/test/java/itest/TwoNodeTestCase.java
    tuscany/sca-java-2.x/trunk/itest/nodes/one-jvm-tribes/src/test/java/itest/TwoRemoteNodesTestCase.java
    tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/TuscanyURI.java
      - copied, changed from r904420, tuscany/sca-java-2.x/trunk/modules/endpoint-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/ConfigURI.java
    tuscany/sca-java-2.x/trunk/modules/core-spi/src/test/java/org/apache/tuscany/sca/runtime/ConfigURITestCase.java
      - copied, changed from r904420, tuscany/sca-java-2.x/trunk/modules/endpoint-hazelcast/src/test/java/org/apache/tuscany/sca/endpoint/hazelcast/ConfigURITestCase.java
Removed:
    tuscany/sca-java-2.x/trunk/modules/endpoint-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/ConfigURI.java
    tuscany/sca-java-2.x/trunk/modules/endpoint-hazelcast/src/test/java/org/apache/tuscany/sca/endpoint/hazelcast/ConfigURITestCase.java
Modified:
    tuscany/sca-java-2.x/trunk/itest/nodes/pom.xml
    tuscany/sca-java-2.x/trunk/modules/endpoint-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/HazelcastEndpointRegistry.java
    tuscany/sca-java-2.x/trunk/modules/endpoint-tribes/src/main/java/org/apache/tuscany/sca/endpoint/tribes/ReplicatedEndpointRegistry.java
    tuscany/sca-java-2.x/trunk/modules/endpoint-tribes/src/main/java/org/apache/tuscany/sca/endpoint/tribes/TribesDomainRegistryFactory.java

Propchange: tuscany/sca-java-2.x/trunk/itest/nodes/one-jvm-tribes/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Jan 29 14:08:43 2010
@@ -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/sca-java-2.x/trunk/itest/nodes/one-jvm-tribes/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/itest/nodes/one-jvm-tribes/pom.xml?rev=904504&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/itest/nodes/one-jvm-tribes/pom.xml (added)
+++ tuscany/sca-java-2.x/trunk/itest/nodes/one-jvm-tribes/pom.xml Fri Jan 29 14:08:43 2010
@@ -0,0 +1,82 @@
+<?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-one-jvm-tribes</artifactId>
+    <name>Apache Tuscany SCA iTest Nodes One JVM Using Tribes Registry</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-client-impl</artifactId>
+            <version>2.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-endpoint-tribes</artifactId>
+            <version>2.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-binding-sca-runtime-rmi</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>
+    <build>
+            <plugins>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-surefire-plugin</artifactId>
+                    <version>2.5</version>
+                    <configuration>
+                        <includes>
+                            <include>**/*TestCase.java</include>
+                        </includes>
+                        <reportFormat>brief</reportFormat>
+                        <useFile>false</useFile>
+                        <forkMode>once</forkMode>
+                        <argLine>-ea -Xmx256m</argLine>
+                        <parallel>off</parallel>
+                    </configuration>
+                </plugin>
+            </plugins>
+    </build>
+</project>

Added: tuscany/sca-java-2.x/trunk/itest/nodes/one-jvm-tribes/src/test/java/itest/OneNodeTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/itest/nodes/one-jvm-tribes/src/test/java/itest/OneNodeTestCase.java?rev=904504&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/itest/nodes/one-jvm-tribes/src/test/java/itest/OneNodeTestCase.java (added)
+++ tuscany/sca-java-2.x/trunk/itest/nodes/one-jvm-tribes/src/test/java/itest/OneNodeTestCase.java Fri Jan 29 14:08:43 2010
@@ -0,0 +1,76 @@
+/*
+ * 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 java.net.URI;
+
+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;
+import org.oasisopen.sca.client.SCAClientFactory;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class OneNodeTestCase{
+
+	private static URI domainURI = URI.create("OneNodeTestCase");
+    private static Node node;
+
+    @BeforeClass
+    public static void setUpBeforeClass() throws Exception {
+        node = NodeFactory.getInstance().createNode(domainURI, "../helloworld-service/target/classes", "../helloworld-client/target/classes");
+        node.start();
+    }
+
+    @Test
+    public void testNode() throws Exception {
+
+        Helloworld service = node.getService(Helloworld.class, "HelloworldService");
+        assertNotNull(service);
+        assertEquals("Hello Petra", service.sayHello("Petra"));
+
+        Helloworld client = node.getService(Helloworld.class, "HelloworldClient");
+        assertNotNull(client);
+        assertEquals("Hi Hello Petra", client.sayHello("Petra"));
+
+        Helloworld scaClientService = SCAClientFactory.newInstance(domainURI).getService(Helloworld.class, "HelloworldService");
+        assertNotNull(scaClientService);
+        assertEquals("Hello Petra", scaClientService.sayHello("Petra"));
+
+        Helloworld scaClientClient = SCAClientFactory.newInstance(domainURI).getService(Helloworld.class, "HelloworldClient");
+        assertNotNull(scaClientClient);
+        assertEquals("Hi Hello Petra", scaClientClient.sayHello("Petra"));
+    
+    }
+
+    @AfterClass
+    public static void tearDownAfterClass() throws Exception {
+        if (node != null) {
+            node.stop();
+        }
+    }
+}

Added: tuscany/sca-java-2.x/trunk/itest/nodes/one-jvm-tribes/src/test/java/itest/TwoNodeTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/itest/nodes/one-jvm-tribes/src/test/java/itest/TwoNodeTestCase.java?rev=904504&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/itest/nodes/one-jvm-tribes/src/test/java/itest/TwoNodeTestCase.java (added)
+++ tuscany/sca-java-2.x/trunk/itest/nodes/one-jvm-tribes/src/test/java/itest/TwoNodeTestCase.java Fri Jan 29 14:08:43 2010
@@ -0,0 +1,82 @@
+/*
+ * 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 java.net.URI;
+
+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;
+import org.oasisopen.sca.client.SCAClientFactory;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class TwoNodeTestCase{
+
+	private static URI domainURI = URI.create("TwoNodeTestCase");
+    private static Node serviceNode;
+    private static Node clientNode;
+
+    @BeforeClass
+    public static void setUpBeforeClass() throws Exception {
+        serviceNode = NodeFactory.getInstance().createNode(domainURI, "../helloworld-service/target/classes");
+        serviceNode.start();
+        clientNode = NodeFactory.getInstance().createNode(domainURI, "../helloworld-client/target/classes");
+        clientNode.start();
+    }
+
+    @Test
+    public void testNode() throws Exception {
+
+        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"));
+
+        Helloworld scaClientService = SCAClientFactory.newInstance(domainURI).getService(Helloworld.class, "HelloworldService");
+        assertNotNull(scaClientService);
+        assertEquals("Hello Petra", scaClientService.sayHello("Petra"));
+
+        Helloworld scaClientClient = SCAClientFactory.newInstance(domainURI).getService(Helloworld.class, "HelloworldClient");
+        assertNotNull(scaClientClient);
+        assertEquals("Hi Hello Petra", scaClientClient.sayHello("Petra"));
+    
+    }
+
+    @AfterClass
+    public static void tearDownAfterClass() throws Exception {
+        if (serviceNode != null) {
+        	serviceNode.stop();
+        }
+        if (clientNode != null) {
+        	clientNode.stop();
+        }
+    }
+}

Added: tuscany/sca-java-2.x/trunk/itest/nodes/one-jvm-tribes/src/test/java/itest/TwoRemoteNodesTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/itest/nodes/one-jvm-tribes/src/test/java/itest/TwoRemoteNodesTestCase.java?rev=904504&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/itest/nodes/one-jvm-tribes/src/test/java/itest/TwoRemoteNodesTestCase.java (added)
+++ tuscany/sca-java-2.x/trunk/itest/nodes/one-jvm-tribes/src/test/java/itest/TwoRemoteNodesTestCase.java Fri Jan 29 14:08:43 2010
@@ -0,0 +1,82 @@
+/*
+ * 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 java.net.URI;
+
+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;
+import org.oasisopen.sca.client.SCAClientFactory;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class TwoRemoteNodesTestCase{
+
+    private static Node serviceNode;
+    private static Node clientNode;
+
+    @BeforeClass
+    public static void setUpBeforeClass() throws Exception {
+        serviceNode = NodeFactory.newInstance().createNode(URI.create("tuscany:TwoRemoteNodesTestCase"), "../helloworld-service/target/classes");
+        serviceNode.start();
+
+        clientNode = NodeFactory.getInstance().createNode(URI.create("tuscany:TwoRemoteNodesTestCase"), "../helloworld-client/target/classes");
+        clientNode.start();
+    }
+
+    @Test
+    public void testNode() throws Exception {
+
+        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"));
+
+//        Helloworld scaClientService = SCAClientFactory.newInstance(URI.create("TwoRemoteNodesTestCase")).getService(Helloworld.class, "HelloworldService");
+//        assertNotNull(scaClientService);
+//        assertEquals("Hello Petra", scaClientService.sayHello("Petra"));
+
+        Helloworld scaClientClient = SCAClientFactory.newInstance(URI.create("TwoRemoteNodesTestCase")).getService(Helloworld.class, "HelloworldClient");
+        assertNotNull(scaClientClient);
+        assertEquals("Hi Hello Petra", scaClientClient.sayHello("Petra"));
+    
+    }
+
+    @AfterClass
+    public static void tearDownAfterClass() throws Exception {
+        if (serviceNode != null) {
+        	serviceNode.stop();
+        }
+        if (clientNode != null) {
+        	clientNode.stop();
+        }
+    }
+}

Modified: tuscany/sca-java-2.x/trunk/itest/nodes/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/itest/nodes/pom.xml?rev=904504&r1=904503&r2=904504&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/itest/nodes/pom.xml (original)
+++ tuscany/sca-java-2.x/trunk/itest/nodes/pom.xml Fri Jan 29 14:08:43 2010
@@ -45,6 +45,7 @@
     <module>one-jvm</module>
     <module>one-jvm-hazelcast</module>
     <module>one-jvm-hazelcast-client</module>
+    <module>one-jvm-tribes</module>
     <module>one-node-test</module>
     <module>two-nodes-test</module>
     <module>two-nodes-two-vms-test</module>

Copied: tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/TuscanyURI.java (from r904420, tuscany/sca-java-2.x/trunk/modules/endpoint-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/ConfigURI.java)
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/TuscanyURI.java?p2=tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/TuscanyURI.java&p1=tuscany/sca-java-2.x/trunk/modules/endpoint-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/ConfigURI.java&r1=904420&r2=904504&rev=904504&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/endpoint-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/ConfigURI.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/TuscanyURI.java Fri Jan 29 14:08:43 2010
@@ -17,7 +17,7 @@
  * under the License.    
  */
 
-package org.apache.tuscany.sca.endpoint.hazelcast;
+package org.apache.tuscany.sca.runtime;
 
 import java.net.URI;
 import java.util.ArrayList;
@@ -38,10 +38,8 @@
  *             otherwise if remotes= is not specified then multicast defaults to 224.5.12.10:51482
  * remotes - a list of ipAddress:port for remote nodes
  *             
- * TODO: move this to a base module as it will also be used by the SCAClient
- *       add JCA encryption config
  */
-public class ConfigURI {
+public class TuscanyURI {
     
     private String domainName = "default";
     private String bindAddress = null; // null means all network adapters
@@ -53,7 +51,7 @@
     private List<String> remotes = new ArrayList<String>();
     private String uri;
 
-    public ConfigURI(String uri) {
+    public TuscanyURI(String uri) {
         this.uri = uri;
         parseURI(uri);
     }

Copied: tuscany/sca-java-2.x/trunk/modules/core-spi/src/test/java/org/apache/tuscany/sca/runtime/ConfigURITestCase.java (from r904420, tuscany/sca-java-2.x/trunk/modules/endpoint-hazelcast/src/test/java/org/apache/tuscany/sca/endpoint/hazelcast/ConfigURITestCase.java)
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/core-spi/src/test/java/org/apache/tuscany/sca/runtime/ConfigURITestCase.java?p2=tuscany/sca-java-2.x/trunk/modules/core-spi/src/test/java/org/apache/tuscany/sca/runtime/ConfigURITestCase.java&p1=tuscany/sca-java-2.x/trunk/modules/endpoint-hazelcast/src/test/java/org/apache/tuscany/sca/endpoint/hazelcast/ConfigURITestCase.java&r1=904420&r2=904504&rev=904504&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/endpoint-hazelcast/src/test/java/org/apache/tuscany/sca/endpoint/hazelcast/ConfigURITestCase.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/core-spi/src/test/java/org/apache/tuscany/sca/runtime/ConfigURITestCase.java Fri Jan 29 14:08:43 2010
@@ -17,12 +17,13 @@
  * under the License.    
  */
 
-package org.apache.tuscany.sca.endpoint.hazelcast;
+package org.apache.tuscany.sca.runtime;
 
 import java.net.UnknownHostException;
 
 import junit.framework.Assert;
 
+import org.apache.tuscany.sca.runtime.TuscanyURI;
 import org.junit.Test;
 
 public class ConfigURITestCase {
@@ -30,7 +31,7 @@
     @Test
     public void testInvalidPrefix() throws UnknownHostException {
         try {
-            new ConfigURI("foo");
+            new TuscanyURI("foo");
             Assert.fail();
         } catch (IllegalArgumentException e) {
             // expected
@@ -39,14 +40,14 @@
 
     @Test
     public void testDomainName() throws UnknownHostException {
-        ConfigURI configURI = new ConfigURI("tuscany:myDomain");
+        TuscanyURI configURI = new TuscanyURI("tuscany:myDomain");
         Assert.assertEquals("myDomain", configURI.getDomainName());
         Assert.assertFalse(configURI.isMulticastDisabled());
     }
 
     @Test
     public void testListenAddr() throws UnknownHostException {
-        ConfigURI configURI = new ConfigURI("tuscany:myDomain?listen=4321");
+        TuscanyURI configURI = new TuscanyURI("tuscany:myDomain?listen=4321");
         Assert.assertEquals("myDomain", configURI.getDomainName());
         Assert.assertFalse(configURI.isMulticastDisabled());
         Assert.assertEquals(4321, configURI.getListenPort());
@@ -54,7 +55,7 @@
     }
     @Test
     public void testListenAddr2() throws UnknownHostException {
-        ConfigURI configURI = new ConfigURI("tuscany:myDomain?listen=1.1.1.1:4321");
+        TuscanyURI configURI = new TuscanyURI("tuscany:myDomain?listen=1.1.1.1:4321");
         Assert.assertEquals("myDomain", configURI.getDomainName());
         Assert.assertFalse(configURI.isMulticastDisabled());
         Assert.assertEquals(4321, configURI.getListenPort());
@@ -63,14 +64,14 @@
 
     @Test
     public void testMulticase1() throws UnknownHostException {
-        ConfigURI configURI = new ConfigURI("tuscany:myDomain?multicast=off");
+        TuscanyURI configURI = new TuscanyURI("tuscany:myDomain?multicast=off");
         Assert.assertEquals("myDomain", configURI.getDomainName());
         Assert.assertTrue(configURI.isMulticastDisabled());
     }
 
     @Test
     public void testMulticase2() throws UnknownHostException {
-        ConfigURI configURI = new ConfigURI("tuscany:myDomain?multicast=1.2.3.4:67");
+        TuscanyURI configURI = new TuscanyURI("tuscany:myDomain?multicast=1.2.3.4:67");
         Assert.assertEquals("myDomain", configURI.getDomainName());
         Assert.assertFalse(configURI.isMulticastDisabled());
         Assert.assertEquals("1.2.3.4", configURI.getMulticastAddress());
@@ -79,7 +80,7 @@
 
     @Test
     public void testMulticase3() throws UnknownHostException {
-        ConfigURI configURI = new ConfigURI("tuscany:myDomain?multicast=1.2.3.4");
+        TuscanyURI configURI = new TuscanyURI("tuscany:myDomain?multicast=1.2.3.4");
         Assert.assertEquals("myDomain", configURI.getDomainName());
         Assert.assertFalse(configURI.isMulticastDisabled());
         Assert.assertEquals("1.2.3.4", configURI.getMulticastAddress());
@@ -88,14 +89,14 @@
 
     @Test
     public void testPassword() {
-        ConfigURI configURI = new ConfigURI("tuscany:myDomain?password=bla");
+        TuscanyURI configURI = new TuscanyURI("tuscany:myDomain?password=bla");
         Assert.assertEquals("myDomain", configURI.getDomainName());
         Assert.assertEquals("bla", configURI.getPassword());
     }
 
     @Test
     public void testRemotes() throws UnknownHostException {
-        ConfigURI configURI = new ConfigURI("tuscany:myDomain?remotes=1.1.1.1:23,2.2.2.2");
+        TuscanyURI configURI = new TuscanyURI("tuscany:myDomain?remotes=1.1.1.1:23,2.2.2.2");
         Assert.assertEquals("myDomain", configURI.getDomainName());
         Assert.assertTrue(configURI.isMulticastDisabled());
         Assert.assertEquals(2, configURI.getRemotes().size());

Modified: tuscany/sca-java-2.x/trunk/modules/endpoint-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/HazelcastEndpointRegistry.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/endpoint-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/HazelcastEndpointRegistry.java?rev=904504&r1=904503&r2=904504&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/endpoint-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/HazelcastEndpointRegistry.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/endpoint-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/HazelcastEndpointRegistry.java Fri Jan 29 14:08:43 2010
@@ -32,6 +32,7 @@
 import org.apache.tuscany.sca.runtime.BaseEndpointRegistry;
 import org.apache.tuscany.sca.runtime.EndpointRegistry;
 import org.apache.tuscany.sca.runtime.RuntimeEndpoint;
+import org.apache.tuscany.sca.runtime.TuscanyURI;
 
 import com.hazelcast.config.Config;
 import com.hazelcast.config.TcpIpConfig;
@@ -51,7 +52,7 @@
 public class HazelcastEndpointRegistry extends BaseEndpointRegistry implements EndpointRegistry, LifeCycleListener, EntryListener<String, Endpoint>, MembershipListener {
     private final static Logger logger = Logger.getLogger(HazelcastEndpointRegistry.class.getName());
 
-    protected ConfigURI configURI;
+    protected TuscanyURI configURI;
 
     private HazelcastInstance hazelcastInstance;
     protected Map<Object, Object> map;
@@ -62,7 +63,7 @@
                                      String domainRegistryURI,
                                      String domainURI) {
         super(registry, attributes, domainRegistryURI, domainURI);
-        this.configURI = new ConfigURI(domainRegistryURI);
+        this.configURI = new TuscanyURI(domainRegistryURI);
     }
 
     public void start() {

Modified: tuscany/sca-java-2.x/trunk/modules/endpoint-tribes/src/main/java/org/apache/tuscany/sca/endpoint/tribes/ReplicatedEndpointRegistry.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/endpoint-tribes/src/main/java/org/apache/tuscany/sca/endpoint/tribes/ReplicatedEndpointRegistry.java?rev=904504&r1=904503&r2=904504&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/endpoint-tribes/src/main/java/org/apache/tuscany/sca/endpoint/tribes/ReplicatedEndpointRegistry.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/endpoint-tribes/src/main/java/org/apache/tuscany/sca/endpoint/tribes/ReplicatedEndpointRegistry.java Fri Jan 29 14:08:43 2010
@@ -51,6 +51,7 @@
 import org.apache.tuscany.sca.runtime.BaseEndpointRegistry;
 import org.apache.tuscany.sca.runtime.EndpointRegistry;
 import org.apache.tuscany.sca.runtime.RuntimeEndpoint;
+import org.apache.tuscany.sca.runtime.TuscanyURI;
 
 /**
  * A replicated EndpointRegistry based on Apache Tomcat Tribes
@@ -117,6 +118,13 @@
         if (uri.getPort() != -1) {
             map.put("port", String.valueOf(uri.getPort()));
         }
+        
+        if (domainRegistryURI.startsWith("tuscany")) {
+            setTuscanyConfig(map, domainRegistryURI);
+            setConfig(map);
+            return map;
+        }
+        
         int index = domainRegistryURI.indexOf('?');
         if (index == -1) {
             setConfig(map);
@@ -139,6 +147,27 @@
         return map;
     }
 
+    private void setTuscanyConfig(Map<String, String> map, String domainRegistryURI) {
+        TuscanyURI tuscanyURI = new TuscanyURI(domainRegistryURI);
+        map.put("address", tuscanyURI.getMulticastAddress());
+        map.put("port", Integer.toString(tuscanyURI.getMulticastPort()));
+        map.put("bind", tuscanyURI.getBindAddress());
+        map.put("receiverPort", Integer.toString(tuscanyURI.getListenPort()));
+        if (tuscanyURI.isMulticastDisabled()) {
+            map.put("nomcast", "true");
+        }
+        if (tuscanyURI.getRemotes().size() > 0) {
+            String routes = "";
+            for (int i=0; i<tuscanyURI.getRemotes().size(); i++) {
+                routes += tuscanyURI.getRemotes().get(i);
+                if (i < tuscanyURI.getRemotes().size()) {
+                    routes += ",";
+                }
+            }
+            map.put("routes", routes);
+        }
+    }
+
     private void setConfig(Map<String, String> attributes) {
         String portStr = attributes.get("port");
         if (portStr != null) {

Modified: tuscany/sca-java-2.x/trunk/modules/endpoint-tribes/src/main/java/org/apache/tuscany/sca/endpoint/tribes/TribesDomainRegistryFactory.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/endpoint-tribes/src/main/java/org/apache/tuscany/sca/endpoint/tribes/TribesDomainRegistryFactory.java?rev=904504&r1=904503&r2=904504&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/endpoint-tribes/src/main/java/org/apache/tuscany/sca/endpoint/tribes/TribesDomainRegistryFactory.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/endpoint-tribes/src/main/java/org/apache/tuscany/sca/endpoint/tribes/TribesDomainRegistryFactory.java Fri Jan 29 14:08:43 2010
@@ -28,7 +28,7 @@
  * given domain
  */
 public class TribesDomainRegistryFactory extends BaseDomainRegistryFactory {
-    private final static String[] schemes = new String[] {"multicast", "tribes"};
+    private final static String[] schemes = new String[] {"multicast", "tribes", "tuscany"};
 
     /**
      * @param extensionRegistry