tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sl...@apache.org
Subject svn commit: r573552 [3/3] - in /incubator/tuscany/java/sca: modules/binding-sca-axis2/src/main/java/org/apache/tuscany/sca/binding/sca/axis2/impl/ modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/ modules/binding-sca/src...
Date Fri, 07 Sep 2007 11:41:56 GMT
Added: incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/domain/NodeInfo.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/domain/NodeInfo.java?rev=573552&view=auto
==============================================================================
--- incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/domain/NodeInfo.java (added)
+++ incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/domain/NodeInfo.java Fri Sep  7 04:41:52 2007
@@ -0,0 +1,72 @@
+/*
+ * 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 org.apache.tuscany.sca.distributed.domain;
+
+import org.osoa.sca.annotations.Remotable;
+
+
+/**
+ * A collection of info for a registered node
+ * 
+ * @version $Rev: 552343 $ $Date$
+ */
+public interface NodeInfo {
+    
+    /**
+     * Retrieve the domain uri
+     * 
+     * @return domain uri
+     */
+    public String getDomainUri();
+    
+    /**
+     * Retrieve the node uri
+     * 
+     * @return node uri
+     */    
+    public String getNodeUri();
+    
+    /**
+     * Ser the node manager url
+     * 
+     * @param nodeManagerUrl
+     */    
+    public void setNodeManagerUrl(String nodeManagerUrl);
+    
+    /**
+     * Retrieve the node manager url
+     * 
+     * @return node manager url
+     */     
+    public String getNodeManagerUrl();
+    
+    /**
+     * Returns true if this node info object matches the provided data
+     */
+    public boolean match(String domainUri, String nodeUri);
+      
+    /** 
+     * Returns a string representation of the information for a service
+     * 
+     * @return
+     */
+    public String toString();
+ 
+}

Propchange: incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/domain/NodeInfo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/domain/NodeInfo.java
------------------------------------------------------------------------------
    svn:keywords = Red Date

Added: incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/domain/ServiceDiscoveryService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/domain/ServiceDiscoveryService.java?rev=573552&view=auto
==============================================================================
--- incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/domain/ServiceDiscoveryService.java (added)
+++ incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/domain/ServiceDiscoveryService.java Fri Sep  7 04:41:52 2007
@@ -0,0 +1,64 @@
+/*
+ * 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 org.apache.tuscany.sca.distributed.domain;
+
+import org.osoa.sca.annotations.Remotable;
+
+
+/**
+ * Provides a mechanism whereby service endoints can be shared amongst the 
+ * nodes of a domain.
+ * 
+ * @version $Rev: 552343 $ $Date$
+ */
+@Remotable
+public interface ServiceDiscoveryService {
+   
+    /**
+     * Accepts information about a service endpoint and holds onto it
+     * 
+     * @param domainUri the string uri for the distributed domain
+     * @param nodeUri the string uri for the current node
+     * @param serviceName the name of the service that is exposed and the provided endpoint
+     * @param bindingName the remote binding that is providing the endpoint
+     * @param url the enpoint url
+     * @return TBD - information about the registration
+     */
+    public String registerServiceEndpoint(String domainUri, String nodeUri, String serviceName, String bindingName, String URL);
+    
+    /**
+     * Locates information about a service endpoint 
+     * 
+     * @param domainUri the string uri for the distributed domain
+     * @param serviceName the name of the service that is exposed and the provided endpoint
+     * @param bindingName the remote binding that we want to find an endpoint for
+     * @return url the endpoint url
+     */
+    public String findServiceEndpoint(String domainUri, String serviceName, String bindingName); 
+    
+    
+    /** 
+     * Returns information for all registered services
+     * @return
+     */
+    public ServiceInfo getServiceInfo();
+    
+
+}

Propchange: incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/domain/ServiceDiscoveryService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/domain/ServiceDiscoveryService.java
------------------------------------------------------------------------------
    svn:keywords = Red Date

Added: incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/domain/ServiceInfo.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/domain/ServiceInfo.java?rev=573552&view=auto
==============================================================================
--- incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/domain/ServiceInfo.java (added)
+++ incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/domain/ServiceInfo.java Fri Sep  7 04:41:52 2007
@@ -0,0 +1,40 @@
+/*
+ * 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 org.apache.tuscany.sca.distributed.domain;
+
+import org.osoa.sca.annotations.Remotable;
+
+
+/**
+ * A collection of info for a registered service
+ * 
+ * @version $Rev: 552343 $ $Date$
+ */
+@Remotable
+public interface ServiceInfo {
+      
+    /** 
+     * Returns a string representation of the information for a service
+     * 
+     * @return
+     */
+    public String toString();
+ 
+}

Propchange: incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/domain/ServiceInfo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/domain/ServiceInfo.java
------------------------------------------------------------------------------
    svn:keywords = Red Date

Added: incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/ComponentInfo.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/ComponentInfo.java?rev=573552&view=auto
==============================================================================
--- incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/ComponentInfo.java (added)
+++ incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/ComponentInfo.java Fri Sep  7 04:41:52 2007
@@ -0,0 +1,57 @@
+/*
+ * 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 org.apache.tuscany.sca.distributed.node;
+
+/**
+ * A collection of information about a component
+ * 
+ * @version $Rev: 552343 $ $Date$
+ */
+public interface ComponentInfo {
+    
+    /**
+     * Get the component name
+     * 
+     * @return component name
+     */
+    public String getName();
+    
+    /**
+     * Set the component name
+     * 
+     * @param name component name
+     */
+    public void setName(String name);
+
+    /**
+     * Set to true if the component has been started
+     * 
+     * @return true if the component is started
+     */
+    public boolean isStarted();
+    
+    /** 
+     * Set the started status of the component
+     * 
+     * @param started
+     */
+    public void setStarted(boolean started);
+
+}

Propchange: incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/ComponentInfo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/ComponentInfo.java
------------------------------------------------------------------------------
    svn:keywords = Red Date

Added: incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/ComponentListener.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/ComponentListener.java?rev=573552&view=auto
==============================================================================
--- incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/ComponentListener.java (added)
+++ incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/ComponentListener.java Fri Sep  7 04:41:52 2007
@@ -0,0 +1,47 @@
+/*
+ * 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 org.apache.tuscany.sca.distributed.node;
+
+import java.util.EventListener;
+
+import org.apache.tuscany.sca.assembly.Component;
+
+/**
+ * A listener interface for changes in component state
+ * 
+ * @version $Rev: 552343 $ $Date$
+ */
+public interface ComponentListener extends EventListener {
+    
+    /**
+     * Component has been started
+     * 
+     * @param component
+     */ 
+    void componentStarted(Component component);
+    
+    /** 
+     * Compoent has been stopped
+     * 
+     * @param component
+     */
+    void componentStopped(Component component);
+
+}

Propchange: incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/ComponentListener.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/ComponentListener.java
------------------------------------------------------------------------------
    svn:keywords = Red Date

Added: incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/ComponentManager.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/ComponentManager.java?rev=573552&view=auto
==============================================================================
--- incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/ComponentManager.java (added)
+++ incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/ComponentManager.java Fri Sep  7 04:41:52 2007
@@ -0,0 +1,85 @@
+/*
+ * 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 org.apache.tuscany.sca.distributed.node;
+
+import java.util.List;
+
+import org.apache.tuscany.sca.assembly.Component;
+import org.apache.tuscany.sca.core.assembly.ActivationException;
+
+/**
+ * A set of operations for managing the components in a node
+ * 
+ * @version $Rev: 552343 $ $Date$
+ */
+public interface ComponentManager {
+
+    /**
+     * Get a list of component objects 
+     * 
+     * @return list of components
+     */
+    List<Component> getComponents();
+
+    /**
+     * Get a component object by name
+     * 
+     * @param componentName
+     * @return component
+     */
+    Component getComponent(String componentName);
+    
+    /** 
+     * Returns true if the named component is started
+     * @param component
+     * @return true if component is started
+     */
+    boolean isComponentStarted(Component component);
+
+    /** 
+     * Start a component. Makes it ready to receive messages
+     * 
+     * @param component
+     * @throws ActivationException
+     */
+    void startComponent(Component component) throws ActivationException;
+
+    /**
+     * Stop  component. 
+     * @param component
+     * @throws ActivationException
+     */
+    void stopComponent(Component component) throws ActivationException;
+
+    /**
+     * Add a listener that will be called back when the component state changes
+     * 
+     * @param listener
+     */
+    void addComponentListener(ComponentListener listener);
+
+    /**
+     * Remove a component listener
+     * 
+     * @param listener
+     */
+    void removeComponentListener(ComponentListener listener);
+    
+}

Propchange: incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/ComponentManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/ComponentManager.java
------------------------------------------------------------------------------
    svn:keywords = Red Date

Added: incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/ComponentManagerService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/ComponentManagerService.java?rev=573552&view=auto
==============================================================================
--- incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/ComponentManagerService.java (added)
+++ incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/ComponentManagerService.java Fri Sep  7 04:41:52 2007
@@ -0,0 +1,66 @@
+/*
+ * 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 org.apache.tuscany.sca.distributed.node;
+
+import java.util.List;
+
+import org.apache.tuscany.sca.core.assembly.ActivationException;
+import org.osoa.sca.annotations.Remotable;
+
+/**
+ * A service interface for managing the components in a node
+ * 
+ * @version $Rev: 552343 $ $Date$
+ */
+@Remotable
+public interface ComponentManagerService {
+
+    /**
+     * Get a list of component info. On for each component in the node
+     * 
+     * @return
+     */
+    List<ComponentInfo> getComponentInfos();
+
+    /**
+     * The info for a named component
+     * 
+     * @param componentName
+     * @return
+     */
+    ComponentInfo getComponentInfo(String componentName);
+
+    /**
+     * Start a component, making it ready to receive messages
+     * 
+     * @param componentName
+     * @throws ActivationException
+     */
+    void startComponent(String componentName) throws ActivationException;
+
+    /** 
+     * Stop a component
+     * 
+     * @param componentName
+     * @throws ActivationException
+     */
+    void stopComponent(String componentName) throws ActivationException;
+
+}

Propchange: incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/ComponentManagerService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/ComponentManagerService.java
------------------------------------------------------------------------------
    svn:keywords = Red Date

Added: incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/CompositeManager.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/CompositeManager.java?rev=573552&view=auto
==============================================================================
--- incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/CompositeManager.java (added)
+++ incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/CompositeManager.java Fri Sep  7 04:41:52 2007
@@ -0,0 +1,50 @@
+/*
+ * 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 org.apache.tuscany.sca.distributed.node;
+
+
+/**
+ * A management interface for composites in the distributed domain
+ * 
+ * 
+ * @version $Rev: 552343 $ $Date$
+ */
+public interface CompositeManager {
+       
+    /**
+     * Starts a named component
+     * 
+     * @param domainUri the string uri for the distributed domain
+     * @param nodeUri the string uri for the node
+     * @param componentName the name of the component to be started
+     */
+    public void startComposite(String domainUri, String nodeUri, String compositeName);
+    
+    
+    /**
+     * Stops a named component
+     * 
+     * @param domainUri the string uri for the distributed domain
+     * @param nodeUri the string uri for the node
+     * @param componentName the name of the component to be started
+     */
+    public void stopComposite(String domainUri, String nodeUri, String compositeName);
+     
+}

Propchange: incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/CompositeManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/CompositeManager.java
------------------------------------------------------------------------------
    svn:keywords = Red Date

Added: incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/ContributionManager.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/ContributionManager.java?rev=573552&view=auto
==============================================================================
--- incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/ContributionManager.java (added)
+++ incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/ContributionManager.java Fri Sep  7 04:41:52 2007
@@ -0,0 +1,69 @@
+/*
+ * 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 org.apache.tuscany.sca.distributed.node;
+
+import java.io.IOException;
+
+import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException;
+import org.apache.tuscany.sca.contribution.service.ContributionException;
+import org.apache.tuscany.sca.core.assembly.ActivationException;
+
+
+/**
+ * A management interface for contributions in the distributed domain
+ * 
+ * @version $Rev: 552343 $ $Date$
+ */
+public interface ContributionManager {
+       
+    /**
+     * Accepts a new contribution and passes it onto the domain implementation
+     * 
+     * @throws ActivationException
+     */
+    public void addContribution(String contributionLocation)
+     throws ActivationException, ContributionException, IOException, CompositeBuilderException;
+    
+    /**
+     * Removes the specified contribution from the domain
+     * 
+     * throws ActivationException
+     */
+    public void removeContribution(String contributionLocation)
+      throws ActivationException, ContributionException;
+    
+    
+    /**
+     * starts the contribution
+     * 
+     * @throws ActivationException
+     */
+    public void startContribution(String contributionLocation)
+      throws ActivationException, ContributionException, IOException, CompositeBuilderException;
+    
+    /**
+     * stops the contribution
+     * 
+     * @throws ActivationException
+     */
+    public void stopContribution(String contributionLocation)
+      throws ActivationException;
+ 
+}

Propchange: incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/ContributionManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/ContributionManager.java
------------------------------------------------------------------------------
    svn:keywords = Red Date

Added: incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/Node.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/Node.java?rev=573552&view=auto
==============================================================================
--- incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/Node.java (added)
+++ incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/Node.java Fri Sep  7 04:41:52 2007
@@ -0,0 +1,105 @@
+/*
+ * 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 org.apache.tuscany.sca.distributed.node;
+
+import org.apache.tuscany.sca.distributed.domain.ServiceDiscoveryService;
+import org.osoa.sca.CallableReference;
+import org.osoa.sca.ServiceReference;
+
+
+/**
+ * An SCA Node. Where a domain runs components
+ * 
+ * @version $Rev: 556897 $ $Date$
+ */
+public interface Node {
+    
+    /**
+     * Returns the name of the distributed domain that this node
+     * is part of.
+     * 
+     * @return the domain URI
+     */
+    public String getDomainUri();
+    
+    /**
+     * Returns the name of the name of this node
+     * 
+     * @return the node name
+     */
+    public String getNodeUri();  
+    
+    /**
+     * Return the nodes component manager
+     * 
+     * @return component manager
+     */
+    public ComponentManager getComponentManager();
+
+/*
+    public CompositeManager getCompositeManager();
+*/
+    
+    /**
+     * Return the nodes contribution manager
+     * 
+     * @return contribution manager
+     */
+    public ContributionManager getContributionManager();     
+    
+    /**
+     * Cast a type-safe reference to a CallableReference. Converts a type-safe
+     * reference to an equivalent CallableReference; if the target refers to a
+     * service then a ServiceReference will be returned, if the target refers to
+     * a callback then a CallableReference will be returned.
+     * 
+     * @param target a reference proxy provided by the SCA runtime
+     * @param <B> the Java type of the business interface for the reference
+     * @param <R> the type of reference to be returned
+     * @return a CallableReference equivalent for the proxy
+     * @throws IllegalArgumentException if the supplied instance is not a
+     *             reference supplied by the SCA runtime
+     */
+    public abstract <B, R extends CallableReference<B>> R cast(B target) throws IllegalArgumentException;
+
+    /**
+     * Returns a proxy for a service provided by a component in the SCA domain.
+     * 
+     * @param businessInterface the interface that will be used to invoke the
+     *            service
+     * @param serviceName the name of the service
+     * @param <B> the Java type of the business interface for the service
+     * @return an object that implements the business interface
+     */
+    public abstract <B> B getService(Class<B> businessInterface, String serviceName);
+
+    /**
+     * Returns a ServiceReference for a service provided by a component in the
+     * SCA domain.
+     * 
+     * @param businessInterface the interface that will be used to invoke the
+     *            service
+     * @param serviceName the name of the service
+     * @param <B> the Java type of the business interface for the service
+     * @return a ServiceReference for the designated service
+     */
+    public abstract <B> ServiceReference<B> getServiceReference(Class<B> businessInterface, String referenceName);
+    
+}

Propchange: incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/Node.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/Node.java
------------------------------------------------------------------------------
    svn:keywords = Red Date

Added: incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/NodeManagerInitService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/NodeManagerInitService.java?rev=573552&view=auto
==============================================================================
--- incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/NodeManagerInitService.java (added)
+++ incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/NodeManagerInitService.java Fri Sep  7 04:41:52 2007
@@ -0,0 +1,38 @@
+/*
+ * 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 org.apache.tuscany.sca.distributed.node;
+
+
+/**
+ * Initializes the Node Management component
+ * 
+ * @version $Rev: 552343 $ $Date$
+ */
+
+public interface NodeManagerInitService {
+     
+    /**
+     * Set the node object into the NodeManagement component so that is can manage it
+     * 
+     * @param node
+     */
+    public void setNode(Node node);
+    
+}

Propchange: incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/NodeManagerInitService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/NodeManagerInitService.java
------------------------------------------------------------------------------
    svn:keywords = Red Date

Added: incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/NodeManagerService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/NodeManagerService.java?rev=573552&view=auto
==============================================================================
--- incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/NodeManagerService.java (added)
+++ incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/NodeManagerService.java Fri Sep  7 04:41:52 2007
@@ -0,0 +1,49 @@
+/*
+ * 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 org.apache.tuscany.sca.distributed.node;
+
+import org.osoa.sca.annotations.Remotable;
+
+
+/**
+ * The management interface for a node
+ * 
+ * @version $Rev: 552343 $ $Date$
+ */
+@Remotable
+public interface NodeManagerService {
+     
+    /** 
+     * Return the Uri that identifies the node
+     * 
+     * @return
+     */
+    public String getNodeUri();
+    
+    /**
+     * The configuration of a domain running on this node has changed.
+     * It is the responsibility of the node to respond to this and retrieve
+     * any relevent configuration changes 
+     *  
+     * @param domainUri the string uri for the distributed domain
+     */
+   // public void addContribution(String domainUri);   
+ 
+}

Propchange: incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/NodeManagerService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/NodeManagerService.java
------------------------------------------------------------------------------
    svn:keywords = Red Date

Modified: incubator/tuscany/java/sca/samples/calculator-distributed/build.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/calculator-distributed/build.xml?rev=573552&r1=573551&r2=573552&view=diff
==============================================================================
--- incubator/tuscany/java/sca/samples/calculator-distributed/build.xml (original)
+++ incubator/tuscany/java/sca/samples/calculator-distributed/build.xml Fri Sep  7 04:41:52 2007
@@ -108,80 +108,88 @@
 	
 	<!-- If you want to test without building the distribution jars set the       -->
 	<!-- localtion value of the m2.repo on your machine and use the targets below -->
-	<property name="m2.repo"   value="your dir here\.m2\repository" />
-    <path id="repo.classpath">
-        <!--pathelement location="${classpath}"/-->
+	<property name="m2.repo"   value="C:\Documents and Settings\slaws\.m2\repository" />
+    <path id="repo.classpath">   	
+    	<pathelement location="target/classes"/>
+    	<pathelement location="${m2.repo}\commons-io\commons-io\1.1\commons-io-1.1.jar"/>
+    	<pathelement location="${m2.repo}\xerces\xercesImpl\2.8.1\xercesImpl-2.8.1.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\geronimo\specs\geronimo-jms_1.1_spec\1.1\geronimo-jms_1.1_spec-1.1.jar"/>
+    	<pathelement location="${m2.repo}\wsdl4j\wsdl4j\1.6.2\wsdl4j-1.6.2.jar"/>
+    	<pathelement location="${m2.repo}\commons-codec\commons-codec\1.3\commons-codec-1.3.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-binding-sca\1.0-incubating-SNAPSHOT\tuscany-binding-sca-1.0-incubating-SNAPSHOT.jar"/>
+    	<pathelement location="${m2.repo}\xml-apis\xml-apis\1.3.03\xml-apis-1.3.03.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-http-tomcat\1.0-incubating-SNAPSHOT\tuscany-http-tomcat-1.0-incubating-SNAPSHOT.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-implementation-resource\1.0-incubating-SNAPSHOT\tuscany-implementation-resource-1.0-incubating-SNAPSHOT.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-assembly-xml\1.0-incubating-SNAPSHOT\tuscany-assembly-xml-1.0-incubating-SNAPSHOT.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-assembly\1.0-incubating-SNAPSHOT\tuscany-assembly-1.0-incubating-SNAPSHOT.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-interface-wsdl\1.0-incubating-SNAPSHOT\tuscany-interface-wsdl-1.0-incubating-SNAPSHOT.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\axis2\axis2-java2wsdl\1.2\axis2-java2wsdl-1.2.jar"/>
+    	<pathelement location="${m2.repo}\cglib\cglib-nodep\2.1_3\cglib-nodep-2.1_3.jar"/>
+    	<pathelement location="${m2.repo}\backport-util-concurrent\backport-util-concurrent\2.2\backport-util-concurrent-2.2.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-policy-xml\1.0-incubating-SNAPSHOT\tuscany-policy-xml-1.0-incubating-SNAPSHOT.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-interface\1.0-incubating-SNAPSHOT\tuscany-interface-1.0-incubating-SNAPSHOT.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-topology\1.0-incubating-SNAPSHOT\tuscany-topology-1.0-incubating-SNAPSHOT.jar"/>
+    	<pathelement location="${m2.repo}\commons-logging\commons-logging\1.1\commons-logging-1.1.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-extension-helper\1.0-incubating-SNAPSHOT\tuscany-extension-helper-1.0-incubating-SNAPSHOT.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-binding-jsonrpc\1.0-incubating-SNAPSHOT\tuscany-binding-jsonrpc-1.0-incubating-SNAPSHOT.jar"/>
+    	<pathelement location="${m2.repo}\logkit\logkit\1.0.1\logkit-1.0.1.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-interface-java-xml\1.0-incubating-SNAPSHOT\tuscany-interface-java-xml-1.0-incubating-SNAPSHOT.jar"/>
+    	<pathelement location="${m2.repo}\commons-fileupload\commons-fileupload\1.1.1\commons-fileupload-1.1.1.jar"/>
     	<pathelement location="${m2.repo}\annogen\annogen\0.1.0\annogen-0.1.0.jar"/>
-        <pathelement location="${m2.repo}\avalon-framework\avalon-framework\4.1.3\avalon-framework-4.1.3.jar"/>
-        <pathelement location="${m2.repo}\backport-util-concurrent\backport-util-concurrent\2.2\backport-util-concurrent-2.2.jar"/>
-        <pathelement location="${m2.repo}\cglib\cglib-nodep\2.1_3\cglib-nodep-2.1_3.jar"/>
-        <pathelement location="${m2.repo}\commons-codec\commons-codec\1.3\commons-codec-1.3.jar"/>
-        <pathelement location="${m2.repo}\commons-fileupload\commons-fileupload\1.1.1\commons-fileupload-1.1.1.jar"/>
-        <pathelement location="${m2.repo}\commons-httpclient\commons-httpclient\3.0.1\commons-httpclient-3.0.1.jar"/>
-        <pathelement location="${m2.repo}\commons-io\commons-io\1.1\commons-io-1.1.jar"/>
-        <pathelement location="${m2.repo}\commons-logging\commons-logging\1.1\commons-logging-1.1.jar"/>
-        <pathelement location="${m2.repo}\javax\activation\activation\1.1\activation-1.1.jar"/>
-        <pathelement location="${m2.repo}\javax\mail\mail\1.4\mail-1.4.jar"/>
     	<pathelement location="${m2.repo}\javax\servlet\servlet-api\2.5\servlet-api-2.5.jar"/>
-        <pathelement location="${m2.repo}\jaxen\jaxen\1.1-beta-9\jaxen-1.1-beta-9.jar"/>
-        <pathelement location="${m2.repo}\log4j\log4j\1.2.12\log4j-1.2.12.jar"/>
-        <pathelement location="${m2.repo}\logkit\logkit\1.0.1\logkit-1.0.1.jar"/>
-        <pathelement location="${m2.repo}\org\apache\ant\ant\1.7.0\ant-1.7.0.jar"/>
-        <pathelement location="${m2.repo}\org\apache\ant\ant-launcher\1.7.0\ant-launcher-1.7.0.jar"/>
-        <pathelement location="${m2.repo}\org\apache\axis2\axis2-java2wsdl\1.2\axis2-java2wsdl-1.2.jar"/>
-        <pathelement location="${m2.repo}\org\apache\axis2\axis2-kernel\1.2\axis2-kernel-1.2.jar"/>
-        <pathelement location="${m2.repo}\org\apache\geronimo\specs\geronimo-commonj_1.1_spec\1.0\geronimo-commonj_1.1_spec-1.0.jar"/>
-        <pathelement location="${m2.repo}\org\apache\geronimo\specs\geronimo-jms_1.1_spec\1.1\geronimo-jms_1.1_spec-1.1.jar"/>
-        <pathelement location="${m2.repo}\org\apache\httpcomponents\jakarta-httpcore\4.0-alpha4\jakarta-httpcore-4.0-alpha4.jar"/>
-        <pathelement location="${m2.repo}\org\apache\neethi\neethi\2.0.1\neethi-2.0.1.jar"/>
-        <pathelement location="${m2.repo}\org\apache\tuscany\sca\sca-api\1.0-incubating-SNAPSHOT\sca-api-1.0-incubating-SNAPSHOT.jar"/>
-        <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-assembly\1.0-incubating-SNAPSHOT\tuscany-assembly-1.0-incubating-SNAPSHOT.jar"/>
-        <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-assembly-xml\1.0-incubating-SNAPSHOT\tuscany-assembly-xml-1.0-incubating-SNAPSHOT.jar"/>
-        <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-binding-sca\1.0-incubating-SNAPSHOT\tuscany-binding-sca-1.0-incubating-SNAPSHOT.jar"/>
-        <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-binding-sca-axis2\1.0-incubating-SNAPSHOT\tuscany-binding-sca-axis2-1.0-incubating-SNAPSHOT.jar"/>
-        <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-binding-sca-xml\1.0-incubating-SNAPSHOT\tuscany-binding-sca-xml-1.0-incubating-SNAPSHOT.jar"/>
-        <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-binding-ws\1.0-incubating-SNAPSHOT\tuscany-binding-ws-1.0-incubating-SNAPSHOT.jar"/>
-        <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-binding-ws-axis2\1.0-incubating-SNAPSHOT\tuscany-binding-ws-axis2-1.0-incubating-SNAPSHOT.jar"/>
-        <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-binding-ws-xml\1.0-incubating-SNAPSHOT\tuscany-binding-ws-xml-1.0-incubating-SNAPSHOT.jar"/>
-        <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-contribution\1.0-incubating-SNAPSHOT\tuscany-contribution-1.0-incubating-SNAPSHOT.jar"/>
-        <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-contribution-impl\1.0-incubating-SNAPSHOT\tuscany-contribution-impl-1.0-incubating-SNAPSHOT.jar"/>
-        <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-contribution-java\1.0-incubating-SNAPSHOT\tuscany-contribution-java-1.0-incubating-SNAPSHOT.jar"/>
-        <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-contribution-namespace\1.0-incubating-SNAPSHOT\tuscany-contribution-namespace-1.0-incubating-SNAPSHOT.jar"/>
-        <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-core\1.0-incubating-SNAPSHOT\tuscany-core-1.0-incubating-SNAPSHOT.jar"/>
-        <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-core-databinding\1.0-incubating-SNAPSHOT\tuscany-core-databinding-1.0-incubating-SNAPSHOT.jar"/>
-        <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-core-spi\1.0-incubating-SNAPSHOT\tuscany-core-spi-1.0-incubating-SNAPSHOT.jar"/>
-        <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-databinding\1.0-incubating-SNAPSHOT\tuscany-databinding-1.0-incubating-SNAPSHOT.jar"/>
-        <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-databinding-axiom\1.0-incubating-SNAPSHOT\tuscany-databinding-axiom-1.0-incubating-SNAPSHOT.jar"/>
-        <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-distributed\1.0-incubating-SNAPSHOT\tuscany-distributed-1.0-incubating-SNAPSHOT.jar"/>
-        <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-distributed-impl\1.0-incubating-SNAPSHOT\tuscany-distributed-impl-1.0-incubating-SNAPSHOT.jar"/>
-        <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-host-embedded\1.0-incubating-SNAPSHOT\tuscany-host-embedded-1.0-incubating-SNAPSHOT.jar"/>
-        <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-host-http\1.0-incubating-SNAPSHOT\tuscany-host-http-1.0-incubating-SNAPSHOT.jar"/>
-    	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-http-jetty\1.0-incubating-SNAPSHOT\tuscany-http-jetty-1.0-incubating-SNAPSHOT.jar"/>
-        <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-implementation-java\1.0-incubating-SNAPSHOT\tuscany-implementation-java-1.0-incubating-SNAPSHOT.jar"/>
-        <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-implementation-java-runtime\1.0-incubating-SNAPSHOT\tuscany-implementation-java-runtime-1.0-incubating-SNAPSHOT.jar"/>
-        <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-implementation-java-xml\1.0-incubating-SNAPSHOT\tuscany-implementation-java-xml-1.0-incubating-SNAPSHOT.jar"/>
-        <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-interface\1.0-incubating-SNAPSHOT\tuscany-interface-1.0-incubating-SNAPSHOT.jar"/>
-        <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-interface-java\1.0-incubating-SNAPSHOT\tuscany-interface-java-1.0-incubating-SNAPSHOT.jar"/>
-        <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-interface-java-xml\1.0-incubating-SNAPSHOT\tuscany-interface-java-xml-1.0-incubating-SNAPSHOT.jar"/>
-        <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-interface-wsdl\1.0-incubating-SNAPSHOT\tuscany-interface-wsdl-1.0-incubating-SNAPSHOT.jar"/>
-        <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-interface-wsdl-xml\1.0-incubating-SNAPSHOT\tuscany-interface-wsdl-xml-1.0-incubating-SNAPSHOT.jar"/>
-        <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-policy\1.0-incubating-SNAPSHOT\tuscany-policy-1.0-incubating-SNAPSHOT.jar"/>
-    	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-policy-xml\1.0-incubating-SNAPSHOT\tuscany-policy-xml-1.0-incubating-SNAPSHOT.jar"/>
-        <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-topology\1.0-incubating-SNAPSHOT\tuscany-topology-1.0-incubating-SNAPSHOT.jar"/>
-        <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-topology-xml\1.0-incubating-SNAPSHOT\tuscany-topology-xml-1.0-incubating-SNAPSHOT.jar"/>
-        <pathelement location="${m2.repo}\org\apache\woden\woden\1.0-incubating-M7a\woden-1.0-incubating-M7a.jar"/>
-        <pathelement location="${m2.repo}\org\apache\ws\commons\axiom\axiom-api\1.2.4\axiom-api-1.2.4.jar"/>
-        <pathelement location="${m2.repo}\org\apache\ws\commons\axiom\axiom-dom\1.2.4\axiom-dom-1.2.4.jar"/>
-        <pathelement location="${m2.repo}\org\apache\ws\commons\axiom\axiom-impl\1.2.4\axiom-impl-1.2.4.jar"/>
-        <pathelement location="${m2.repo}\org\apache\ws\commons\schema\XmlSchema\1.3.1\XmlSchema-1.3.1.jar"/>
-        <pathelement location="${m2.repo}\org\codehaus\woodstox\wstx-asl\3.2.1\wstx-asl-3.2.1.jar"/>
-    	<pathelement location="${m2.repo}\org\mortbay\jetty\jetty\6.1.0\jetty-6.1.0.jar"/>
-    	<pathelement location="${m2.repo}\org\mortbay\jetty\jetty-util\6.1.0\jetty-util-6.1.0.jar"/>
-        <pathelement location="${m2.repo}\stax\stax-api\1.0.1\stax-api-1.0.1.jar"/>
-        <pathelement location="${m2.repo}\wsdl4j\wsdl4j\1.6.2\wsdl4j-1.6.2.jar"/>
-        <pathelement location="${m2.repo}\xerces\xercesImpl\2.8.1\xercesImpl-2.8.1.jar"/>
-        <pathelement location="${m2.repo}\xml-apis\xml-apis\1.3.03\xml-apis-1.3.03.jar"/>    	
-    	<pathelement location="target/classes"/>    	
+    	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-binding-http\1.0-incubating-SNAPSHOT\tuscany-binding-http-1.0-incubating-SNAPSHOT.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-host-embedded\1.0-incubating-SNAPSHOT\tuscany-host-embedded-1.0-incubating-SNAPSHOT.jar"/>
+    	<pathelement location="${m2.repo}\commons-httpclient\commons-httpclient\3.0.1\commons-httpclient-3.0.1.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\ws\commons\axiom\axiom-impl\1.2.4\axiom-impl-1.2.4.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\httpcomponents\jakarta-httpcore\4.0-alpha4\jakarta-httpcore-4.0-alpha4.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-binding-ws-xml\1.0-incubating-SNAPSHOT\tuscany-binding-ws-xml-1.0-incubating-SNAPSHOT.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-contribution-java\1.0-incubating-SNAPSHOT\tuscany-contribution-java-1.0-incubating-SNAPSHOT.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\ws\commons\axiom\axiom-api\1.2.4\axiom-api-1.2.4.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-implementation-java-runtime\1.0-incubating-SNAPSHOT\tuscany-implementation-java-runtime-1.0-incubating-SNAPSHOT.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\geronimo\specs\geronimo-commonj_1.1_spec\1.0\geronimo-commonj_1.1_spec-1.0.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\tomcat\catalina\6.0.10\catalina-6.0.10.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-core-spi\1.0-incubating-SNAPSHOT\tuscany-core-spi-1.0-incubating-SNAPSHOT.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-binding-sca-axis2\1.0-incubating-SNAPSHOT\tuscany-binding-sca-axis2-1.0-incubating-SNAPSHOT.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\ant\ant-launcher\1.7.0\ant-launcher-1.7.0.jar"/>
+    	<pathelement location="${m2.repo}\jaxen\jaxen\1.1-beta-9\jaxen-1.1-beta-9.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\tuscany\sca\sca-api\1.0-incubating-SNAPSHOT\sca-api-1.0-incubating-SNAPSHOT.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-topology-xml\1.0-incubating-SNAPSHOT\tuscany-topology-xml-1.0-incubating-SNAPSHOT.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\tomcat\coyote\6.0.10\coyote-6.0.10.jar"/>
+    	<pathelement location="${m2.repo}\com\metaparadigm\json-rpc\1.0\json-rpc-1.0.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\ws\commons\axiom\axiom-dom\1.2.4\axiom-dom-1.2.4.jar"/>
+    	<pathelement location="${m2.repo}\junit\junit\4.2\junit-4.2.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\ws\commons\schema\XmlSchema\1.3.1\XmlSchema-1.3.1.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-contribution-namespace\1.0-incubating-SNAPSHOT\tuscany-contribution-namespace-1.0-incubating-SNAPSHOT.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-binding-ws\1.0-incubating-SNAPSHOT\tuscany-binding-ws-1.0-incubating-SNAPSHOT.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-implementation-java-xml\1.0-incubating-SNAPSHOT\tuscany-implementation-java-xml-1.0-incubating-SNAPSHOT.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-policy\1.0-incubating-SNAPSHOT\tuscany-policy-1.0-incubating-SNAPSHOT.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-interface-wsdl-xml\1.0-incubating-SNAPSHOT\tuscany-interface-wsdl-xml-1.0-incubating-SNAPSHOT.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-implementation-java\1.0-incubating-SNAPSHOT\tuscany-implementation-java-1.0-incubating-SNAPSHOT.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-distributed-impl\1.0-incubating-SNAPSHOT\tuscany-distributed-impl-1.0-incubating-SNAPSHOT.jar"/>
+    	<pathelement location="${m2.repo}\javax\activation\activation\1.1\activation-1.1.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\ant\ant\1.7.0\ant-1.7.0.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-core\1.0-incubating-SNAPSHOT\tuscany-core-1.0-incubating-SNAPSHOT.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\axis2\axis2-adb\1.2\axis2-adb-1.2.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\woden\woden\1.0-incubating-M7a\woden-1.0-incubating-M7a.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\tomcat\annotations-api\6.0.10\annotations-api-6.0.10.jar"/>
+    	<pathelement location="${m2.repo}\avalon-framework\avalon-framework\4.1.3\avalon-framework-4.1.3.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-contribution\1.0-incubating-SNAPSHOT\tuscany-contribution-1.0-incubating-SNAPSHOT.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\tomcat\juli\6.0.10\juli-6.0.10.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-databinding\1.0-incubating-SNAPSHOT\tuscany-databinding-1.0-incubating-SNAPSHOT.jar"/>
+    	<pathelement location="${m2.repo}\log4j\log4j\1.2.12\log4j-1.2.12.jar"/>
+    	<pathelement location="${m2.repo}\javax\mail\mail\1.4\mail-1.4.jar"/>
+    	<pathelement location="${m2.repo}\org\codehaus\woodstox\wstx-asl\3.2.1\wstx-asl-3.2.1.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-host-http\1.0-incubating-SNAPSHOT\tuscany-host-http-1.0-incubating-SNAPSHOT.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-binding-ws-axis2\1.0-incubating-SNAPSHOT\tuscany-binding-ws-axis2-1.0-incubating-SNAPSHOT.jar"/>
+    	<pathelement location="${m2.repo}\stax\stax-api\1.0.1\stax-api-1.0.1.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-interface-java\1.0-incubating-SNAPSHOT\tuscany-interface-java-1.0-incubating-SNAPSHOT.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-contribution-impl\1.0-incubating-SNAPSHOT\tuscany-contribution-impl-1.0-incubating-SNAPSHOT.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-databinding-axiom\1.0-incubating-SNAPSHOT\tuscany-databinding-axiom-1.0-incubating-SNAPSHOT.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-distributed\1.0-incubating-SNAPSHOT\tuscany-distributed-1.0-incubating-SNAPSHOT.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\axis2\axis2-kernel\1.2\axis2-kernel-1.2.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\neethi\neethi\2.0.1\neethi-2.0.1.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-binding-sca-xml\1.0-incubating-SNAPSHOT\tuscany-binding-sca-xml-1.0-incubating-SNAPSHOT.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-core-databinding\1.0-incubating-SNAPSHOT\tuscany-core-databinding-1.0-incubating-SNAPSHOT.jar"/>    	
     </path>	
     	
     <target name="runDomainNodeRepo">

Modified: incubator/tuscany/java/sca/samples/calculator-distributed/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/calculator-distributed/pom.xml?rev=573552&r1=573551&r2=573552&view=diff
==============================================================================
--- incubator/tuscany/java/sca/samples/calculator-distributed/pom.xml (original)
+++ incubator/tuscany/java/sca/samples/calculator-distributed/pom.xml Fri Sep  7 04:41:52 2007
@@ -73,15 +73,29 @@
             <version>1.0-incubating-SNAPSHOT</version>
         </dependency>   
         
-        <!-- dependency>
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-binding-jsonrpc</artifactId>
+            <version>1.0-incubating-SNAPSHOT</version>
+        </dependency>   
+        
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-binding-http</artifactId>
+            <version>1.0-incubating-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>        
+        
+        <dependency>
             <groupId>org.apache.tuscany.sca</groupId>
-            <artifactId>tuscany-binding-jms</artifactId>
+            <artifactId>tuscany-implementation-resource</artifactId>
             <version>1.0-incubating-SNAPSHOT</version>
-        </dependency -->         
+            <scope>runtime</scope>
+        </dependency>   
         
         <dependency>
             <groupId>org.apache.tuscany.sca</groupId>
-            <artifactId>tuscany-http-jetty</artifactId>
+            <artifactId>tuscany-http-tomcat</artifactId>
             <version>1.0-incubating-SNAPSHOT</version>
             <scope>test</scope>
         </dependency>          

Modified: incubator/tuscany/java/sca/samples/calculator-distributed/src/main/java/node/CalculatorNode.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/calculator-distributed/src/main/java/node/CalculatorNode.java?rev=573552&r1=573551&r2=573552&view=diff
==============================================================================
--- incubator/tuscany/java/sca/samples/calculator-distributed/src/main/java/node/CalculatorNode.java (original)
+++ incubator/tuscany/java/sca/samples/calculator-distributed/src/main/java/node/CalculatorNode.java Fri Sep  7 04:41:52 2007
@@ -19,25 +19,10 @@
 
 package node;
 
-import java.io.File;
 import java.io.IOException;
-import java.net.URL;
 
-import org.apache.tuscany.sca.assembly.Binding;
-import org.apache.tuscany.sca.assembly.Component;
-import org.apache.tuscany.sca.assembly.ComponentReference;
-import org.apache.tuscany.sca.assembly.ComponentService;
-import org.apache.tuscany.sca.assembly.Composite;
-import org.apache.tuscany.sca.assembly.SCABinding;
-import org.apache.tuscany.sca.binding.sca.impl.SCABindingImpl;
-import org.apache.tuscany.sca.contribution.Contribution;
-import org.apache.tuscany.sca.contribution.service.ContributionService;
-import org.apache.tuscany.sca.distributed.domain.DistributedSCADomain;
-import org.apache.tuscany.sca.distributed.domain.impl.DistributedSCADomainMemoryImpl;
-import org.apache.tuscany.sca.distributed.domain.impl.DistributedSCADomainNetworkImpl;
-import org.apache.tuscany.sca.distributed.node.impl.EmbeddedNode;
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-import org.apache.tuscany.sca.host.embedded.impl.EmbeddedSCADomain;
+import org.apache.tuscany.sca.distributed.node.impl.NodeImpl;
+
 
 import calculator.CalculatorService;
 
@@ -61,32 +46,25 @@
         
         try {
             String domainName = args[0];
-            String nodeName   = args[1];  
+            String nodeName   = args[1];                       
             
             // Create the distributed domain representation. We use the network implementation 
             // here so that the node contacts a registry running somewhere out on the 
             // network. 
-            DistributedSCADomain distributedDomain = new DistributedSCADomainNetworkImpl(domainName);
-       
-            // create the node that runs the calculator component
-            EmbeddedNode node = new EmbeddedNode(nodeName);
-            SCADomain domain = node.attachDomain(distributedDomain);
-                
+            NodeImpl node = new NodeImpl(domainName, nodeName);
+            node.start();
+
             // the application components are added. The null here just gets the node
             // implementation to read a directory from the classpath with the node name
             // TODO - should be done as a management action.       
-            node.addContribution(domainName, null);  
-            
-            // start the node
-            // TODO - should be done as a management action.
-            node.start();
-                    
+            node.getContributionManager().startContribution(nodeName + "/");  
+                               
             // nodeA is the head node and runs some tests while all other nodes
             // simply listen for incoming messages
             if ( nodeName.equals("nodeA") ) {            
                 // do some application stuff
                 CalculatorService calculatorService = 
-                    domain.getService(CalculatorService.class, "CalculatorServiceComponent");
+                    node.getService(CalculatorService.class, "CalculatorServiceComponent");
         
                 // Calculate
                 System.out.println("3 + 2=" + calculatorService.add(3, 2));
@@ -104,7 +82,7 @@
             }
             
             // stop the node and all the domains in it 
-            domain.close(); 
+            node.stop(); 
         
         } catch(Exception ex) {
             System.err.println("Exception in node - " + ex.getMessage());

Added: incubator/tuscany/java/sca/samples/calculator-distributed/src/main/resources/_node/META-INF/sca-contribution.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/calculator-distributed/src/main/resources/_node/META-INF/sca-contribution.xml?rev=573552&view=auto
==============================================================================
--- incubator/tuscany/java/sca/samples/calculator-distributed/src/main/resources/_node/META-INF/sca-contribution.xml (added)
+++ incubator/tuscany/java/sca/samples/calculator-distributed/src/main/resources/_node/META-INF/sca-contribution.xml Fri Sep  7 04:41:52 2007
@@ -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://management"
+              xmlns:management="http://management">
+   <deployable composite="management:Management"/>
+</contribution>
\ No newline at end of file

Propchange: incubator/tuscany/java/sca/samples/calculator-distributed/src/main/resources/_node/META-INF/sca-contribution.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/calculator-distributed/src/main/resources/_node/META-INF/sca-contribution.xml
------------------------------------------------------------------------------
    svn:keywords = Red Date

Added: incubator/tuscany/java/sca/samples/calculator-distributed/src/main/resources/_node/management.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/calculator-distributed/src/main/resources/_node/management.composite?rev=573552&view=auto
==============================================================================
--- incubator/tuscany/java/sca/samples/calculator-distributed/src/main/resources/_node/management.composite (added)
+++ incubator/tuscany/java/sca/samples/calculator-distributed/src/main/resources/_node/management.composite Fri Sep  7 04:41:52 2007
@@ -0,0 +1,65 @@
+<?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"
+           targetNamespace="http://management"
+           xmlns:sample="http://management"
+           xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
+           name="Management">
+           
+    <component name="NodeManagerComponent">
+        <implementation.java class="org.apache.tuscany.sca.distributed.node.impl.NodeManagerServiceImpl"/>
+        <service name="NodeManagerInitService">
+            <interface.java interface="org.apache.tuscany.sca.distributed.node.NodeManagerInitService"/>
+            <binding.sca/>
+        </service>
+        <service name="NodeManagerService">
+            <interface.java interface="org.apache.tuscany.sca.distributed.node.NodeManagerService"/>
+            <tuscany:binding.jsonrpc uri="http://localhost:8081/NodeManagerComponent/NodeManagerJson"/>
+        </service>
+        <service name="ComponentManagerService">
+            <interface.java interface="org.apache.tuscany.sca.distributed.node.ComponentManagerService"/>
+            <tuscany:binding.jsonrpc uri="http://localhost:8081/NodeManagerComponent/ComponentManagerJson"/>
+        </service>
+    </component>           
+    
+    <component name="DomainManagerComponent">
+        <implementation.java class="org.apache.tuscany.sca.distributed.node.impl.DomainManagerProxyImpl"/>
+        <reference name="domainManager">
+            <interface.java interface="org.apache.tuscany.sca.distributed.domain.DomainManagerService"/>
+            <binding.ws uri="http://localhost:8080/DomainManagerComponent/DomainManager"/>
+        </reference>
+    </component>
+    
+    <component name="ServiceDiscoveryComponent">
+        <implementation.java class="org.apache.tuscany.sca.distributed.node.impl.ServiceDiscoveryProxyImpl" />
+        <reference name="serviceDiscovery">
+            <binding.ws uri="http://localhost:8080/ServiceDiscoveryComponent/ServiceDiscovery"/>
+        </reference>
+    </component>
+
+    <component name="node">
+        <service name="Resource">
+            <tuscany:binding.http uri="http://localhost:8081/node"/>
+        </service>
+       <tuscany:implementation.resource location="webroot"/>
+    </component>    
+    
+
+</composite>

Propchange: incubator/tuscany/java/sca/samples/calculator-distributed/src/main/resources/_node/management.composite
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/calculator-distributed/src/main/resources/_node/management.composite
------------------------------------------------------------------------------
    svn:keywords = Red Date

Added: incubator/tuscany/java/sca/samples/calculator-distributed/src/main/resources/_node/webroot/index.html
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/calculator-distributed/src/main/resources/_node/webroot/index.html?rev=573552&view=auto
==============================================================================
--- incubator/tuscany/java/sca/samples/calculator-distributed/src/main/resources/_node/webroot/index.html (added)
+++ incubator/tuscany/java/sca/samples/calculator-distributed/src/main/resources/_node/webroot/index.html Fri Sep  7 04:41:52 2007
@@ -0,0 +1,69 @@
+<html>
+<!--
+ * 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.    
+ -->
+<head>
+<title>Apache Tuscany Node</TITLE>
+
+    <script type="text/javascript" src="../SCADomain/scaDomain.js"></script>
+
+    <script language="JavaScript">
+    
+       componentManager = new JSONRpcClient("../NodeManagerComponent/ComponentManagerJson");
+
+       function getComponentInfos() {
+          componentManager.ComponentManagerService.getComponentInfos(handleGetComponentInfos);
+       }
+       
+       function handleGetComponentInfos(result) {
+       
+          var text = ""
+          
+          for (var i in result.list){
+              var component = result.list[i];
+              
+              text = text + "<table>";
+              text = text + "<TR CLASS='source_2' >";
+              text = text + "  <TD>" + component.name+ "</TD>";
+              text = text + "  <TD>" + component.started+ "</TD>";
+              text = text + "</TR>";               
+          }
+
+          document.getElementById('nodeInfo').innerHTML=text;
+       }
+           
+
+    </script>
+
+    <link rel="stylesheet" type="text/css" href="style.css" />
+</head>
+
+<body onload="getComponentInfos()">
+
+
+<h1 id="top">Apache Tuscany Node</h1>
+<div id="errors"></div>
+
+<p>Node Name<span id="nodeName"></span>:</p>
+
+<div id="nodeInfo"></div>
+
+<p /><input type="button" value="Refresh" onclick="getComponentInfos()" />
+
+</body>
+</html>

Propchange: incubator/tuscany/java/sca/samples/calculator-distributed/src/main/resources/_node/webroot/index.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/calculator-distributed/src/main/resources/_node/webroot/index.html
------------------------------------------------------------------------------
    svn:keywords = Red Date

Added: incubator/tuscany/java/sca/samples/calculator-distributed/src/main/resources/_node/webroot/node.png
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/calculator-distributed/src/main/resources/_node/webroot/node.png?rev=573552&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/tuscany/java/sca/samples/calculator-distributed/src/main/resources/_node/webroot/node.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/tuscany/java/sca/samples/calculator-distributed/src/main/resources/_node/webroot/style.css
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/calculator-distributed/src/main/resources/_node/webroot/style.css?rev=573552&view=auto
==============================================================================
--- incubator/tuscany/java/sca/samples/calculator-distributed/src/main/resources/_node/webroot/style.css (added)
+++ incubator/tuscany/java/sca/samples/calculator-distributed/src/main/resources/_node/webroot/style.css Fri Sep  7 04:41:52 2007
@@ -0,0 +1,176 @@
+/*
+ * 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.
+ */
+
+p,table,li,h1,h2,h3
+{
+font-family: verdana, arial, 'sans serif'; 
+}
+
+p, h1, h2, h3, table, li, hr
+{
+margin-left: 10pt;
+}
+
+table
+{
+border-color: black;
+border-collapse: separate;
+border-spacing: 0px 1px;
+
+margin-right: 10pt;
+margin-left: 10pt;
+width: 800px;
+}
+
+.sourceDetailsTable
+{
+width: 600px;
+}
+
+tr, td
+{
+margin-left: 0pt;
+margin-right: 0pt;
+padding-left: 10pt;
+font-size: 90%;
+}
+
+p,li,th
+{
+font-size: 90%;
+margin-left: 10pt;
+}
+
+pre
+{
+margin-left: 10pt;
+}
+
+body
+{
+#ffffff;
+}
+
+h1,h2,h3,hr
+{
+color: firebrick;
+}
+
+a:link {COLOR: firebrick;}
+a:visited {COLOR: firebrick;}
+a:active {COLOR: navy;}
+
+.link
+{
+COLOR: firebrick;
+text-decoration: underline;
+}
+
+.clickable
+{
+cursor: pointer
+}
+
+.unread_title
+{
+font-weight: bold;
+}
+
+.read_title
+{
+font-weight: normal;
+}
+
+.summary
+{
+color: DimGrey;
+}
+
+.hidden
+{
+display: none;
+}
+
+.source_name
+{
+width: 600px;
+}
+
+.alert_text
+{
+width: 600px;
+}
+
+.alert_data
+{
+margin-left: 10px;
+width: 800px;
+height: 800px;
+}
+
+.source_0
+{
+background-color: LightGreen;
+}    
+
+.source_1
+{
+background-color: LightSkyBlue;
+}
+
+.source_2
+{
+background-color: Khaki;
+}
+
+.source_3
+{
+background-color: LightPink;
+}
+
+.source_4
+{
+background-color: Orange;
+}
+
+.source_5
+{
+background-color: LightCoral;
+}
+
+.source_6
+{
+background-color: Orchid;
+}
+
+.source_7
+{
+background-color: Peru;
+}
+
+.source_8
+{
+background-color: SpringGreen;
+}
+
+.source_9
+{
+background-color: LightGrey;
+}
+

Propchange: incubator/tuscany/java/sca/samples/calculator-distributed/src/main/resources/_node/webroot/style.css
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/calculator-distributed/src/main/resources/_node/webroot/style.css
------------------------------------------------------------------------------
    svn:keywords = Red Date

Modified: incubator/tuscany/java/sca/samples/calculator-distributed/src/main/resources/domain/META-INF/sca-contribution.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/calculator-distributed/src/main/resources/domain/META-INF/sca-contribution.xml?rev=573552&r1=573551&r2=573552&view=diff
==============================================================================
--- incubator/tuscany/java/sca/samples/calculator-distributed/src/main/resources/domain/META-INF/sca-contribution.xml (original)
+++ incubator/tuscany/java/sca/samples/calculator-distributed/src/main/resources/domain/META-INF/sca-contribution.xml Fri Sep  7 04:41:52 2007
@@ -20,5 +20,5 @@
 <contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
 	      targetNamespace="http://sample"
               xmlns:sample="http://sample">
-   <deployable composite="sample:Calculator"/>
+   <deployable composite="sample:Domain"/>
 </contribution>

Modified: incubator/tuscany/java/sca/samples/calculator-distributed/src/main/resources/domain/domain.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/calculator-distributed/src/main/resources/domain/domain.composite?rev=573552&r1=573551&r2=573552&view=diff
==============================================================================
--- incubator/tuscany/java/sca/samples/calculator-distributed/src/main/resources/domain/domain.composite (original)
+++ incubator/tuscany/java/sca/samples/calculator-distributed/src/main/resources/domain/domain.composite Fri Sep  7 04:41:52 2007
@@ -22,19 +22,23 @@
            xmlns:sample="http://sample"
            name="Domain">
            
-    <!--component name="DistributedDomainManagerComponent">
-        <implementation.java class="org.apache.tuscany.sca.distributed.management.impl.DistributedDomainManagerMemoryImpl"/>
-        <service name="DistributedDomainManager">
-            <interface.java interface="org.apache.tuscany.sca.distributed.management.DistributedDomainManager"/>
-            <binding.ws uri="http://localhost:8080/DistributedDomainManagerComponent/DistributedDomainManager"/>
+    
+    <component name="DomainManagerComponent">
+        <implementation.java class="org.apache.tuscany.sca.distributed.domain.impl.DomainManagerServiceImpl"/>
+        <service name="DomainManagerService">
+            <interface.java interface="org.apache.tuscany.sca.distributed.domain.DomainManagerService"/>
+            <binding.ws uri="http://localhost:8080/DomainManagerComponent/DomainManager"/>
         </service>
-    </component-->
+        <reference name="serviceDiscovery" target="ServiceDiscoveryComponent"/>
+    </component>
+    
     
     <component name="ServiceDiscoveryComponent">
-        <implementation.java class="org.apache.tuscany.sca.distributed.management.impl.ServiceDiscoveryMemoryImpl" />
-        <service name="ServiceDiscovery">
-            <interface.java interface="org.apache.tuscany.sca.distributed.management.ServiceDiscovery"/>
-            <binding.ws uri="http://localhost:8080/ServiceDiscoveryComponent/ServiceDiscovery"/>
+        <implementation.java class="org.apache.tuscany.sca.distributed.domain.impl.ServiceDiscoveryServiceImpl" />
+        <service name="ServiceDiscoveryService">
+            <interface.java interface="org.apache.tuscany.sca.distributed.domain.ServiceDiscoveryService"/>
+            <binding.sca uri="http://localhost:8080/ServiceDiscoveryComponent/ServiceDiscoverySCA"/>
+            <binding.ws uri="http://localhost:8080/ServiceDiscoveryComponent/ServiceDiscovery"/>            
         </service>
     </component>
     

Modified: incubator/tuscany/java/sca/samples/calculator-distributed/src/test/java/calculator/DomainInMemoryTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/calculator-distributed/src/test/java/calculator/DomainInMemoryTestCase.java?rev=573552&r1=573551&r2=573552&view=diff
==============================================================================
--- incubator/tuscany/java/sca/samples/calculator-distributed/src/test/java/calculator/DomainInMemoryTestCase.java (original)
+++ incubator/tuscany/java/sca/samples/calculator-distributed/src/test/java/calculator/DomainInMemoryTestCase.java Fri Sep  7 04:41:52 2007
@@ -19,15 +19,9 @@
 package calculator;
 
 
-import java.io.File;
-import java.net.URL;
-
 import junit.framework.Assert;
 
-import org.apache.tuscany.sca.distributed.domain.DistributedSCADomain;
-import org.apache.tuscany.sca.distributed.domain.impl.DistributedSCADomainMemoryImpl;
-import org.apache.tuscany.sca.distributed.node.impl.EmbeddedNode;
-import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.apache.tuscany.sca.distributed.node.impl.NodeImpl;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -40,65 +34,57 @@
  */
 public class DomainInMemoryTestCase {
     
-    private static String DEFULT_DOMAIN_NAME = "mydomain";
+    private static String DEFAULT_DOMAIN_NAME = "mydomain";
+
+    private static NodeImpl registry;
+    private static NodeImpl domainNodeA;
+    private static NodeImpl domainNodeB;
+    private static NodeImpl domainNodeC;
 
-    private static DistributedSCADomain distributedDomain;
-    private static EmbeddedNode nodeA;
-    private static SCADomain domainA;
-    private static EmbeddedNode nodeB;
-    private static SCADomain domainB;
-    private static EmbeddedNode nodeC;
-    private static SCADomain domainC;    
     private static CalculatorService calculatorServiceA;
 
     @BeforeClass
     public static void init() throws Exception {
-        System.out.println("Setting up distributed nodes");
-        
-        File currentDirectory = new File (".");
-        URL contributionURL = null;
-
-        // Create the distributed domain representation
-        distributedDomain = new DistributedSCADomainMemoryImpl(DEFULT_DOMAIN_NAME);
         
-        // create the node that runs the 
-        // calculator component
-        nodeA = new EmbeddedNode("nodeA");
-        domainA = nodeA.attachDomain(distributedDomain); 
-        contributionURL = Thread.currentThread().getContextClassLoader().getResource("nodeA/");
-        nodeA.addContribution(DEFULT_DOMAIN_NAME, contributionURL);
-
-        // create the node that runs the 
-        // add component
-        nodeB = new EmbeddedNode("nodeB");
-        domainB = nodeB.attachDomain(distributedDomain);
-        contributionURL = Thread.currentThread().getContextClassLoader().getResource("nodeB/");
-        nodeB.addContribution(DEFULT_DOMAIN_NAME, contributionURL);         
- 
-        // create the node that runs the 
-        // subtract component      
-        nodeC = new EmbeddedNode("nodeC");
-        domainC = nodeC.attachDomain(distributedDomain);
-        contributionURL = Thread.currentThread().getContextClassLoader().getResource("nodeC/");
-        nodeC.addContribution(DEFULT_DOMAIN_NAME, contributionURL);  
-     
-        
-        // start all of the nodes
-        nodeA.start();
-        nodeB.start();
-        nodeC.start();
-        
-        // get a reference to the calculator service from domainA
-        // which will be running this component
-        calculatorServiceA = domainA.getService(CalculatorService.class, "CalculatorServiceComponent");     
+        try {
+                System.out.println("Setting up domain registry");
+                
+                registry = new NodeImpl(DEFAULT_DOMAIN_NAME);
+                registry.start();
+                registry.getContributionManager().startContribution("domain/");
+                
+                System.out.println("Setting up distributed nodes");
+                       
+                // Create the domain representation
+                domainNodeA = new NodeImpl(DEFAULT_DOMAIN_NAME, "nodeA");
+                domainNodeA.start();
+                domainNodeA.getContributionManager().startContribution("nodeA/");
+                
+                // Create the domain representation
+                domainNodeB = new NodeImpl(DEFAULT_DOMAIN_NAME, "nodeB");
+                domainNodeB.start();
+                domainNodeB.getContributionManager().startContribution("nodeB/");        
+                
+                // create the node that runs the 
+                // subtract component 
+                domainNodeC = new NodeImpl(DEFAULT_DOMAIN_NAME, "nodeC");
+                domainNodeC.start();
+                domainNodeC.getContributionManager().startContribution("nodeC/");         
+        
+                // get a reference to the calculator service from domainA
+                // which will be running this component
+                calculatorServiceA = domainNodeA.getService(CalculatorService.class, "CalculatorServiceComponent");
+        } catch(Exception ex){
+                System.err.println(ex.toString());
+        }
    }
 
     @AfterClass
     public static void destroy() throws Exception {
-        // stop the nodes and hence the domains they contain        
-        nodeA.stop();
-        nodeB.stop();    
-        nodeC.stop();
+        // stop the domain and hence the nodes it contains  
+        domainNodeA.stop();
+        domainNodeB.stop();
+        domainNodeC.stop();
     }
 
     @Test
@@ -109,7 +95,5 @@
         Assert.assertEquals(calculatorServiceA.subtract(3, 2), 1.0);
         Assert.assertEquals(calculatorServiceA.multiply(3, 2), 6.0);
         Assert.assertEquals(calculatorServiceA.divide(3, 2), 1.5);
-
-        
     }
 }

Modified: incubator/tuscany/java/sca/samples/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/pom.xml?rev=573552&r1=573551&r2=573552&view=diff
==============================================================================
--- incubator/tuscany/java/sca/samples/pom.xml (original)
+++ incubator/tuscany/java/sca/samples/pom.xml Fri Sep  7 04:41:52 2007
@@ -52,6 +52,7 @@
                 <module>company-das</module>
                 <module>company-das-webapp</module>
                 <module>databinding-echo</module>
+                <module>domain-webapp</module>
                 <module>feed-aggregator</module>
                 <module>feed-aggregator-webapp</module>
                 <module>helloworld-dojo-webapp</module>



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org


Mime
View raw message