tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jsdelf...@apache.org
Subject svn commit: r655411 [2/2] - in /incubator/tuscany/java/sca/modules/domain-manager/src: main/java/org/apache/tuscany/sca/domain/manager/impl/ main/java/org/apache/tuscany/sca/domain/manager/launcher/ main/resources/ test/java/org/apache/tuscany/sca/doma...
Date Mon, 12 May 2008 04:48:56 GMT
Modified: incubator/tuscany/java/sca/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/DomainManagerUtil.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/DomainManagerUtil.java?rev=655411&r1=655410&r2=655411&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/DomainManagerUtil.java
(original)
+++ incubator/tuscany/java/sca/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/DomainManagerUtil.java
Sun May 11 21:48:55 2008
@@ -29,11 +29,9 @@
 import org.apache.tuscany.sca.assembly.AssemblyFactory;
 import org.apache.tuscany.sca.assembly.Binding;
 import org.apache.tuscany.sca.assembly.Composite;
-import org.apache.tuscany.sca.core.assembly.ActivationException;
 import org.apache.tuscany.sca.core.assembly.CompositeActivator;
 import org.apache.tuscany.sca.core.context.ServiceReferenceImpl;
 import org.apache.tuscany.sca.core.invocation.ProxyFactory;
-import org.apache.tuscany.sca.host.embedded.impl.ReallySmallRuntime;
 import org.apache.tuscany.sca.interfacedef.InterfaceContract;
 import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory;
 import org.apache.tuscany.sca.runtime.RuntimeComponent;
@@ -241,20 +239,4 @@
         }
     }
 
-    /**
-     * Temporary instantiation of a dummy Tuscany runtime.
-     * FIXME We need a better way to bootstrap without having to create
-     * a runtime instance at all.
-     * 
-     * @return
-     */
-    static ReallySmallRuntime newRuntime() {
-        try {
-            ReallySmallRuntime runtime = new ReallySmallRuntime(Thread.currentThread().getContextClassLoader());
-            runtime.start();
-            return runtime;
-        } catch (ActivationException e) {
-            throw new ServiceRuntimeException(e);
-        }
-    }
 }

Modified: incubator/tuscany/java/sca/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/FileCollectionImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/FileCollectionImpl.java?rev=655411&r1=655410&r2=655411&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/FileCollectionImpl.java
(original)
+++ incubator/tuscany/java/sca/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/FileCollectionImpl.java
Sun May 11 21:48:55 2008
@@ -50,7 +50,7 @@
     public String directoryName;
 
     @Reference
-    public LauncherConfiguration launcherConfiguration;
+    public DomainManagerConfiguration domainManagerConfiguration;
     
     /**
      * Initialize the component.
@@ -62,7 +62,7 @@
     public Entry<String, Item>[] getAll() {
         logger.fine("getAll");
         
-        String rootDirectory = launcherConfiguration.getRootDirectory();
+        String rootDirectory = domainManagerConfiguration.getRootDirectory();
         
         // Return all the files
         List<Entry<String, Item>> entries = new ArrayList<Entry<String,
Item>>();
@@ -94,7 +94,7 @@
     public void delete(String key) throws NotFoundException {
         logger.fine("delete " + key);
 
-        String rootDirectory = launcherConfiguration.getRootDirectory();
+        String rootDirectory = domainManagerConfiguration.getRootDirectory();
         File directory = new File(rootDirectory + "/" + directoryName);
         File file = new File(directory, key);
         if (file.exists()) {

Modified: incubator/tuscany/java/sca/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/FileServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/FileServiceImpl.java?rev=655411&r1=655410&r2=655411&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/FileServiceImpl.java
(original)
+++ incubator/tuscany/java/sca/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/FileServiceImpl.java
Sun May 11 21:48:55 2008
@@ -61,7 +61,7 @@
     public String directoryName;
     
     @Reference
-    public LauncherConfiguration launcherConfiguration;
+    public DomainManagerConfiguration domainManagerConfiguration;
     
     private ServletFileUpload upload;
     
@@ -77,7 +77,7 @@
     public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException
{
 
         // Upload files
-        String rootDirectory = launcherConfiguration.getRootDirectory();
+        String rootDirectory = domainManagerConfiguration.getRootDirectory();
         try {
             for (FileItem item: (List<FileItem>)upload.parseRequest(request)) {
                 if (!item.isFormField()) {
@@ -118,7 +118,7 @@
 
                 // If no scheme is specified then the path identifies file
                 // inside our directory
-                String rootDirectory = launcherConfiguration.getRootDirectory();
+                String rootDirectory = domainManagerConfiguration.getRootDirectory();
                 uri = new File(rootDirectory + "/" + directoryName, path).toURI();
                 
             } else if (!scheme.equals("file")) {

Added: incubator/tuscany/java/sca/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/NodeConfigurationServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/NodeConfigurationServiceImpl.java?rev=655411&view=auto
==============================================================================
--- incubator/tuscany/java/sca/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/NodeConfigurationServiceImpl.java
(added)
+++ incubator/tuscany/java/sca/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/NodeConfigurationServiceImpl.java
Sun May 11 21:48:55 2008
@@ -0,0 +1,96 @@
+/*
+ * 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.domain.manager.impl;
+
+import static org.apache.tuscany.sca.domain.manager.impl.DomainManagerUtil.compositeQName;
+
+import java.io.IOException;
+import java.net.URLDecoder;
+import java.util.logging.Logger;
+
+import javax.servlet.Servlet;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.xml.namespace.QName;
+
+import org.apache.tuscany.sca.implementation.data.collection.Entry;
+import org.apache.tuscany.sca.implementation.data.collection.Item;
+import org.apache.tuscany.sca.implementation.data.collection.LocalItemCollection;
+import org.osoa.sca.annotations.Reference;
+import org.osoa.sca.annotations.Scope;
+import org.osoa.sca.annotations.Service;
+
+/**
+ * Implementation of a service that returns a node configuration. 
+ *
+ * @version $Rev$ $Date$
+ */
+@Scope("COMPOSITE")
+@Service(Servlet.class)
+public class NodeConfigurationServiceImpl extends HttpServlet implements Servlet {
+    private static final long serialVersionUID = 6913769467386954463L;
+
+    private final static Logger logger = Logger.getLogger(NodeConfigurationServiceImpl.class.getName());
   
+
+    @Reference
+    public LocalItemCollection contributionCollection;
+    
+    @Reference
+    public LocalItemCollection cloudCollection;
+    
+    @Override
+    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
+        
+        // Get the request path
+        String path = URLDecoder.decode(request.getRequestURI().substring(request.getServletPath().length()),
"UTF-8");
+        String key = path.startsWith("/")? path.substring(1) : path;
+        logger.fine("get " + key);
+        
+        // The key contains a node name, redirect 
+        // to the corresponding composite config
+            
+        // Get the collection of cloud composites
+        Entry<String, Item>[] cloudEntries = cloudCollection.getAll();
+
+        // Find the specified node
+        for (Entry<String, Item> cloudEntry: cloudEntries) {
+            QName qname = compositeQName(cloudEntry.getKey());
+            if (qname.getLocalPart().equals(key)) {
+                
+                // Found the specified node
+                String related = cloudEntry.getData().getRelated();
+                int i = related.indexOf("composite:");
+                if (i != -1) {
+                    
+                    // Redirect to its composite config
+                    String compositeConfiguration = "/composite-config/?composite=" + related.substring(i);
+                    response.sendRedirect(compositeConfiguration);
+                    return;
+                }
+            }
+        }
+        
+        // Node not found
+        response.sendError(HttpServletResponse.SC_NOT_FOUND, key);
+        return;
+    }
+}

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

Propchange: incubator/tuscany/java/sca/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/NodeConfigurationServiceImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/tuscany/java/sca/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/NodeConfigurationServiceImpl.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: incubator/tuscany/java/sca/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/NodeProcessCollectionFacadeImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/NodeProcessCollectionFacadeImpl.java?rev=655411&r1=655410&r2=655411&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/NodeProcessCollectionFacadeImpl.java
(original)
+++ incubator/tuscany/java/sca/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/NodeProcessCollectionFacadeImpl.java
Sun May 11 21:48:55 2008
@@ -20,8 +20,6 @@
 package org.apache.tuscany.sca.domain.manager.impl;
 
 import static org.apache.tuscany.sca.domain.manager.impl.DomainManagerUtil.compositeQName;
-import static org.apache.tuscany.sca.domain.manager.impl.DomainManagerUtil.dynamicReference;
-import static org.apache.tuscany.sca.domain.manager.impl.DomainManagerUtil.newRuntime;
 import static org.apache.tuscany.sca.domain.manager.impl.DomainManagerUtil.nodeURI;
 
 import java.net.URI;
@@ -32,18 +30,15 @@
 import javax.xml.namespace.QName;
 
 import org.apache.tuscany.sca.assembly.AssemblyFactory;
-import org.apache.tuscany.sca.binding.atom.AtomBinding;
 import org.apache.tuscany.sca.binding.atom.AtomBindingFactory;
 import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
 import org.apache.tuscany.sca.core.ExtensionPointRegistry;
 import org.apache.tuscany.sca.core.assembly.CompositeActivator;
-import org.apache.tuscany.sca.host.embedded.impl.ReallySmallRuntime;
 import org.apache.tuscany.sca.implementation.data.collection.Entry;
 import org.apache.tuscany.sca.implementation.data.collection.Item;
 import org.apache.tuscany.sca.implementation.data.collection.ItemCollection;
 import org.apache.tuscany.sca.implementation.data.collection.LocalItemCollection;
 import org.apache.tuscany.sca.implementation.data.collection.NotFoundException;
-import org.osoa.sca.ServiceReference;
 import org.osoa.sca.ServiceRuntimeException;
 import org.osoa.sca.annotations.Init;
 import org.osoa.sca.annotations.Reference;
@@ -64,6 +59,12 @@
     @Reference
     public LocalItemCollection cloudCollection;
     
+    @Reference
+    public ItemCollection processCollection;
+    
+    @Reference
+    public DomainManagerConfiguration domainManagerConfiguration;
+    
     private AssemblyFactory assemblyFactory;
     private AtomBindingFactory atomBindingFactory;
     private CompositeActivator compositeActivator;
@@ -74,14 +75,12 @@
     @Init
     public void initialize() {
 
-        // Get a runtime
-        ReallySmallRuntime runtime = newRuntime();
-        
         // Get its composite activator
-        compositeActivator = runtime.getCompositeActivator();
+        //FIXME
+        //compositeActivator = runtime.getCompositeActivator();
 
         // Get the model factories
-        ExtensionPointRegistry extensionPoints = runtime.getExtensionPointRegistry();
+        ExtensionPointRegistry extensionPoints = domainManagerConfiguration.getExtensionPoints();
         ModelFactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
         assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
         atomBindingFactory = modelFactories.getFactory(AtomBindingFactory.class);
@@ -240,10 +239,13 @@
      * @return
      */
     private ItemCollection processCollection(String host) {
-        AtomBinding binding = atomBindingFactory.createAtomBinding();
-        binding.setURI("http://" + host + ":9990/node/processes");
-        ServiceReference<ItemCollection> reference = dynamicReference(ItemCollection.class,
binding, assemblyFactory, compositeActivator);
-        return reference.getService();
+        return processCollection;
+        
+//FIXME        
+//        AtomBinding binding = atomBindingFactory.createAtomBinding();
+//        binding.setURI("http://" + host + ":9990/node/processes");
+//        ServiceReference<ItemCollection> reference = dynamicReference(ItemCollection.class,
binding, assemblyFactory, compositeActivator);
+//        return reference.getService();
     }
         
 }

Modified: incubator/tuscany/java/sca/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/launcher/DomainManagerLauncherBootstrap.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/launcher/DomainManagerLauncherBootstrap.java?rev=655411&r1=655410&r2=655411&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/launcher/DomainManagerLauncherBootstrap.java
(original)
+++ incubator/tuscany/java/sca/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/launcher/DomainManagerLauncherBootstrap.java
Sun May 11 21:48:55 2008
@@ -19,7 +19,7 @@
 
 package org.apache.tuscany.sca.domain.manager.launcher;
 
-import org.apache.tuscany.sca.domain.manager.impl.LauncherConfiguration;
+import org.apache.tuscany.sca.domain.manager.impl.DomainManagerConfiguration;
 import org.apache.tuscany.sca.host.embedded.SCADomain;
 import org.apache.tuscany.sca.node.SCANode2;
 
@@ -53,8 +53,8 @@
                 domainManager = SCADomain.newInstance("DomainManager.composite");
 
                 // Set the domain manager's root directory
-                LauncherConfiguration launcherConfiguration = domainManager.getService(LauncherConfiguration.class,
"LauncherConfigurationComponent");
-                launcherConfiguration.setRootDirectory(rootDirectory);
+                DomainManagerConfiguration domainManagerConfiguration = domainManager.getService(DomainManagerConfiguration.class,
"DomainManagerConfigurationComponent");
+                domainManagerConfiguration.setRootDirectory(rootDirectory);
                 
                 started = true;
             } finally {

Modified: incubator/tuscany/java/sca/modules/domain-manager/src/main/resources/DomainManager.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/domain-manager/src/main/resources/DomainManager.composite?rev=655411&r1=655410&r2=655411&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/domain-manager/src/main/resources/DomainManager.composite
(original)
+++ incubator/tuscany/java/sca/modules/domain-manager/src/main/resources/DomainManager.composite
Sun May 11 21:48:55 2008
@@ -85,10 +85,15 @@
    		<service name="ItemCollection">
    	 		<t:binding.atom uri="http://localhost:9990/workspace" title="Contributions"/>
    		</service>
+   		<reference name="domainManagerConfiguration" target="DomainManagerConfigurationComponent"/>
+    </component>
+
+    <component name="ContributionServiceComponent">
+        <implementation.java class="org.apache.tuscany.sca.domain.manager.impl.ContributionServiceImpl"/>
            
    		<service name="Servlet">
    	 		<t:binding.http uri="http://localhost:9990/contribution"/>
    		</service>
-   		<reference name="launcherConfiguration" target="LauncherConfigurationComponent"/>
+   		<reference name="contributionCollection" target="ContributionCollectionComponent/LocalItemCollection"/>
     </component>
 
     <component name="FileCollectionComponent">
@@ -97,7 +102,7 @@
    		<service name="ItemCollection">
    	 		<t:binding.atom uri="http://localhost:9990/feed/files" title="Files"/>
    		</service>
-   		<reference name="launcherConfiguration" target="LauncherConfigurationComponent"/>
+   		<reference name="domainManagerConfiguration" target="DomainManagerConfigurationComponent"/>
     </component>
 
     <component name="FileServiceComponent">
@@ -106,20 +111,26 @@
    		<service name="Servlet">
    	 		<t:binding.http uri="http://localhost:9990/files"/>
    		</service>
-   		<reference name="launcherConfiguration" target="LauncherConfigurationComponent"/>
+   		<reference name="domainManagerConfiguration" target="DomainManagerConfigurationComponent"/>
     </component>
 
     <component name="DomainCompositeCollectionComponent">
         <implementation.java class="org.apache.tuscany.sca.domain.manager.impl.DeployedCompositeCollectionImpl"/>
         <property name="compositeFile">domain.composite</property>
    		<service name="ItemCollection">
-   	 		<t:binding.atom uri="http://localhost:9990/composite" title="Domain Composites"/>
+   	 		<t:binding.atom uri="http://localhost:9990/composite" title="Domain Composite"/>
    		</service>
+        <reference name="deployableCollection" target="DeployableCompositeCollectionComponent/LocalItemCollection"/>
+   		<reference name="domainManagerConfiguration" target="DomainManagerConfigurationComponent"/>
+    </component>
+
+    <component name="DeployableCompositeServiceComponent">
+        <implementation.java class="org.apache.tuscany.sca.domain.manager.impl.DeployableCompositeServiceImpl"/>
    		<service name="Servlet">
    	 		<t:binding.http uri="http://localhost:9990/composite-source"/>
    		</service>
         <reference name="deployableCollection" target="DeployableCompositeCollectionComponent/LocalItemCollection"/>
-   		<reference name="launcherConfiguration" target="LauncherConfigurationComponent"/>
+   		<reference name="domainManagerConfiguration" target="DomainManagerConfigurationComponent"/>
     </component>
 
     <component name="DeployableCompositeCollectionComponent">
@@ -127,9 +138,25 @@
    		<service name="ItemCollection">
    	 		<t:binding.atom uri="http://localhost:9990/deployable" title="Deployable Composites"/>
    		</service>
+   		<reference name="domainManagerConfiguration" target="DomainManagerConfigurationComponent"/>
+   		<reference name="contributionCollection" target="ContributionCollectionComponent/LocalItemCollection"/>
+    </component>
+
+    <component name="CompositeGeneratorServiceComponent">
+        <implementation.java class="org.apache.tuscany.sca.domain.manager.impl.CompositeGeneratorServiceImpl"/>
+   		<service name="Servlet">
+   	 		<t:binding.http uri="http://localhost:9990/composite-generated"/>
+   		</service>
+   		<reference name="domainManagerConfiguration" target="DomainManagerConfigurationComponent"/>
+   		<reference name="contributionCollection" target="ContributionCollectionComponent/LocalItemCollection"/>
+    </component>
+
+    <component name="CompositeConfigurationServiceComponent">
+        <implementation.java class="org.apache.tuscany.sca.domain.manager.impl.CompositeConfigurationServiceImpl"/>
    		<service name="Servlet">
    	 		<t:binding.http uri="http://localhost:9990/composite-resolved"/>
    		</service>
+   		<reference name="domainManagerConfiguration" target="DomainManagerConfigurationComponent"/>
    		<reference name="contributionCollection" target="ContributionCollectionComponent/LocalItemCollection"/>
    		<reference name="domainCompositeCollection" target="DomainCompositeCollectionComponent/LocalItemCollection"/>
    		<reference name="cloudCollection" target="CloudCollectionComponent/LocalItemCollection"/>
@@ -140,14 +167,20 @@
         <property name="compositeFile">cloud.composite</property>
         <property name="deploymentContributionDirectory">cloud</property>   
         
    		<service name="ItemCollection">
-   	 		<t:binding.atom uri="http://localhost:9990/cloud" title="Nodes"/>
+   	 		<t:binding.atom uri="http://localhost:9990/cloud" title="Cloud"/>
    		</service>
+        <reference name="deployableCollection" target="DeployableCompositeCollectionComponent/LocalItemCollection"/>
+        <reference name="processCollection" target="NodeProcessCollectionFacadeComponent/LocalItemCollection"/>
+   		<reference name="domainManagerConfiguration" target="DomainManagerConfigurationComponent"/>
+    </component>
+
+    <component name="CloudCompositeServiceComponent">
+        <implementation.java class="org.apache.tuscany.sca.domain.manager.impl.DeployableCompositeServiceImpl"/>
    		<service name="Servlet">
    	 		<t:binding.http uri="http://localhost:9990/cloud-source"/>
    		</service>
         <reference name="deployableCollection" target="DeployableCompositeCollectionComponent/LocalItemCollection"/>
-        <reference name="processCollection" target="NodeProcessCollectionFacadeComponent/LocalItemCollection"/>
-   		<reference name="launcherConfiguration" target="LauncherConfigurationComponent"/>
+   		<reference name="domainManagerConfiguration" target="DomainManagerConfigurationComponent"/>
     </component>
 
     <component name="CompositeConfigurationCollectionComponent">
@@ -155,6 +188,12 @@
    		<service name="ItemCollection">
    	 		<t:binding.atom uri="http://localhost:9990/composite-config" title="Node Configuration"/>
    		</service>
+   		<reference name="contributionCollection" target="ContributionCollectionComponent/LocalItemCollection"/>
+   		<reference name="cloudCollection" target="CloudCollectionComponent/LocalItemCollection"/>
+    </component>
+
+    <component name="NodeConfigurationServiceComponent">
+        <implementation.java class="org.apache.tuscany.sca.domain.manager.impl.NodeConfigurationServiceImpl"/>
    		<service name="Servlet">
    	 		<t:binding.http uri="http://localhost:9990/node-config"/>
    		</service>
@@ -179,7 +218,11 @@
    		<service name="ItemCollection">
    	 		<t:binding.atom uri="http://localhost:9990/processes" title="Log"/>
    		</service>
+   		<reference name="domainManagerConfiguration" target="DomainManagerConfigurationComponent"/>
    		<reference name="cloudCollection" target="CloudCollectionComponent/LocalItemCollection"/>
+   		<reference name="processCollection" target="NodeProcessCollectionComponent/ItemCollection">
+   	 		<t:binding.atom/>
+   		</reference>
     </component>
 
     <component name="NodeProcessCollectionComponent">
@@ -196,8 +239,8 @@
    		</service>
     </component>
     
-    <component name="LauncherConfigurationComponent">
-        <implementation.java class="org.apache.tuscany.sca.domain.manager.impl.LauncherConfigurationImpl"/>
+    <component name="DomainManagerConfigurationComponent">
+        <implementation.java class="org.apache.tuscany.sca.domain.manager.impl.DomainManagerConfigurationImpl"/>
     </component>
 
 </composite>

Modified: incubator/tuscany/java/sca/modules/domain-manager/src/test/java/org/apache/tuscany/sca/domain/manager/impl/DomainManagerTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/domain-manager/src/test/java/org/apache/tuscany/sca/domain/manager/impl/DomainManagerTestCase.java?rev=655411&r1=655410&r2=655411&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/domain-manager/src/test/java/org/apache/tuscany/sca/domain/manager/impl/DomainManagerTestCase.java
(original)
+++ incubator/tuscany/java/sca/modules/domain-manager/src/test/java/org/apache/tuscany/sca/domain/manager/impl/DomainManagerTestCase.java
Sun May 11 21:48:55 2008
@@ -39,10 +39,10 @@
  * @version $Rev$ $Date$
  */
 public class DomainManagerTestCase extends TestCase {
-    
+
     private ContributionCollectionImpl contributionCollection;
     private DeployableCompositeCollectionImpl deployableCollection;
-    private LauncherConfigurationImpl launcherConfiguration;
+    private DomainManagerConfigurationImpl domainManagerConfiguration;
     
     private final static String WORKSPACE_XML =
         "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
@@ -63,15 +63,19 @@
         writer.close();
         
         // Create a workspace collection component
-        launcherConfiguration = new LauncherConfigurationImpl();
+        domainManagerConfiguration = new DomainManagerConfigurationImpl();
+        domainManagerConfiguration.initialize();
         String root = url.getFile();
         root = root.substring(0, root.lastIndexOf('/'));
-        launcherConfiguration.setRootDirectory(root);
+        domainManagerConfiguration.setRootDirectory(root);
+        
         contributionCollection = new ContributionCollectionImpl();
+        contributionCollection.domainManagerConfiguration = domainManagerConfiguration;
         contributionCollection.workspaceFile = "workspace.xml";
         contributionCollection.deploymentContributionDirectory = "cloud";
-        contributionCollection.launcherConfiguration = launcherConfiguration;
+        contributionCollection.domainManagerConfiguration = domainManagerConfiguration;
         deployableCollection = new DeployableCompositeCollectionImpl();
+        deployableCollection.domainManagerConfiguration = domainManagerConfiguration;
         deployableCollection.contributionCollection = contributionCollection;
         contributionCollection.initialize();
         deployableCollection.initialize();



Mime
View raw message