Author: jsdelfino
Date: Wed Mar 19 23:13:17 2008
New Revision: 639167

URL: http://svn.apache.org/viewvc?rev=639167&view=rev
Log:
Moved workspace admin launcher to the node2-launcher module, to be with the 
other launchers and fix ClassNotFound error when starting a node from the admin 
page. Fix NodeLauncherUtil to load JARs from both the modules and lib 
directories. Minor fixes to the admin UI.

Added:
    
incubator/tuscany/java/sca/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeImplementationLauncherUtil.java
   (with props)
    
incubator/tuscany/java/sca/modules/node2-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/DomainNodeLauncher.java
   (with props)
Removed:
    
incubator/tuscany/java/sca/modules/workspace-admin/src/main/java/org/apache/tuscany/sca/workspace/admin/launcher/DomainAdminLauncher.java
    
incubator/tuscany/java/sca/modules/workspace-admin/src/main/java/org/apache/tuscany/sca/workspace/admin/launcher/DomainAdminLauncherUtil.java
    
incubator/tuscany/java/sca/modules/workspace-admin/src/main/java/org/apache/tuscany/sca/workspace/admin/main/
    
incubator/tuscany/java/sca/modules/workspace-admin/src/main/resources/META-INF/
Modified:
    
incubator/tuscany/java/sca/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeImplementationLauncherBootstrap.java
    
incubator/tuscany/java/sca/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeProcessCollectionImpl.java
    
incubator/tuscany/java/sca/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/webapp/NodeWebAppServletHost.java
    
incubator/tuscany/java/sca/modules/node2-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeLauncherUtil.java
    
incubator/tuscany/java/sca/modules/node2-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeMain.java
    incubator/tuscany/java/sca/modules/workspace-admin/pom.xml
    
incubator/tuscany/java/sca/modules/workspace-admin/src/main/java/org/apache/tuscany/sca/workspace/admin/impl/CompositeImageCollectionImpl.java
    
incubator/tuscany/java/sca/modules/workspace-admin/src/main/resources/DomainAdmin.composite
    
incubator/tuscany/java/sca/modules/workspace-admin/src/main/resources/cloud.html
    
incubator/tuscany/java/sca/modules/workspace-admin/src/main/resources/composite.html
    
incubator/tuscany/java/sca/modules/workspace-admin/src/main/resources/files.html
    
incubator/tuscany/java/sca/modules/workspace-admin/src/main/resources/home.html
    
incubator/tuscany/java/sca/samples/calculator-distributed/src/main/java/node/LaunchDomain.java
    
incubator/tuscany/java/sca/tutorial/domain/launch/LaunchTutorialDomainAdmin.java
    incubator/tuscany/java/sca/tutorial/domain/pom.xml

Modified: 
incubator/tuscany/java/sca/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeImplementationLauncherBootstrap.java
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeImplementationLauncherBootstrap.java?rev=639167&r1=639166&r2=639167&view=diff
==============================================================================
--- 
incubator/tuscany/java/sca/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeImplementationLauncherBootstrap.java
 (original)
+++ 
incubator/tuscany/java/sca/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeImplementationLauncherBootstrap.java
 Wed Mar 19 23:13:17 2008
@@ -35,9 +35,9 @@
     /**
      * Constructs a new node bootstrap.
      */
-    public NodeImplementationLauncherBootstrap(String configurationURI) throws 
Exception {
+    public NodeImplementationLauncherBootstrap(String nodeImageURI) throws 
Exception {
         SCANode2Factory nodeFactory = SCANode2Factory.newInstance();
-        node = nodeFactory.createSCANode(configurationURI);
+        node = nodeFactory.createSCANode(nodeImageURI);
     }
 
     public void start() throws Exception {

Added: 
incubator/tuscany/java/sca/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeImplementationLauncherUtil.java
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeImplementationLauncherUtil.java?rev=639167&view=auto
==============================================================================
--- 
incubator/tuscany/java/sca/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeImplementationLauncherUtil.java
 (added)
+++ 
incubator/tuscany/java/sca/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeImplementationLauncherUtil.java
 Wed Mar 19 23:13:17 2008
@@ -0,0 +1,51 @@
+/*
+ * 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.implementation.node.launcher;
+
+/**
+ * Utility methods for node implementation launchers.
+ *
+ * @version $Rev$ $Date$
+ */
+public class NodeImplementationLauncherUtil {
+
+    private static final String TUSCANY_DOMAIN = "TUSCANY_DOMAIN";
+    private static final String DEFAULT_DOMAIN = "http://localhost:9990";;
+
+    /**
+     * Determine the URI of a node image. The domain URI can be configured
+     * using a TUSCANY_DOMAIN system property or environment variable.
+     * 
+     * @param nodeName
+     * @return
+     */
+    public static String nodeImageURI(String nodeName) {
+        String domain = System.getProperty(TUSCANY_DOMAIN);
+        if (domain == null || domain.length() == 0) {
+            domain = System.getenv(TUSCANY_DOMAIN);
+        }
+        if (domain == null || domain.length() ==0) {
+            domain = DEFAULT_DOMAIN;
+        }
+        String nodeImage = domain + "/node-image/" + nodeName;
+        return nodeImage;
+    }
+    
+}

Propchange: 
incubator/tuscany/java/sca/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeImplementationLauncherUtil.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
incubator/tuscany/java/sca/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeImplementationLauncherUtil.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: 
incubator/tuscany/java/sca/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeProcessCollectionImpl.java
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeProcessCollectionImpl.java?rev=639167&r1=639166&r2=639167&view=diff
==============================================================================
--- 
incubator/tuscany/java/sca/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeProcessCollectionImpl.java
 (original)
+++ 
incubator/tuscany/java/sca/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeProcessCollectionImpl.java
 Wed Mar 19 23:13:17 2008
@@ -59,6 +59,7 @@
     }
     
     public Entry<String, Item>[] getAll() {
+        logger.info("getAll");
         
         // Return all the running VMs
         List<Entry<String, Item>> entries = new ArrayList<Entry<String, 
Item>>();
@@ -69,6 +70,7 @@
     }
 
     public Item get(String key) throws NotFoundException {
+        logger.info("get " + key);
 
         // Return the specified VM
         SCANodeVM vm = vm(key);
@@ -80,6 +82,7 @@
     }
 
     public String post(String key, Item item) {
+        logger.info("post " + key);
         
         // Start a new VM and add it to the collection
         SCANodeVM vm = vm(key);
@@ -103,6 +106,7 @@
     }
 
     public void delete(String key) throws NotFoundException {
+        logger.info("delete " + key);
         
         // Stop a VM and remove it from the collection
         SCANodeVM vm = vm(key);
@@ -114,11 +118,13 @@
             }
             nodeVMs.remove(vm);
         } else {
-            throw new NotFoundException();
+            //throw new NotFoundException();
         }
     }
     
     public Entry<String, Item>[] query(String queryString) {
+        logger.info("query " + queryString);
+        
         if (queryString.startsWith("node=")) {
             
             // Return the log for the specified VM
@@ -198,29 +204,35 @@
          * Starts a node in a new VM.
          */
         private void start() throws IOException {
+
+            // Determine the node image URI
+            String nodeImageURI = 
NodeImplementationLauncherUtil.nodeImageURI(nodeName);
             
             // Build the Java VM command line
             Properties props = System.getProperties();
             String java = props.getProperty("java.home") + "/bin/java";
             String cp = props.getProperty("java.class.path");
             String main = NodeLauncher.class.getName();
-            String url = "http://localhost:9990/node-image/"; + nodeName;
-            final String[] command = new String[]{ java, "-cp", cp, main , 
url};
+            final String[] command = new String[]{ java, "-cp", cp, main , 
nodeImageURI};
+
+            logger.info("Starting " + "java " + main + " " + nodeImageURI);
             
             // Start the VM
             ProcessBuilder builder = new ProcessBuilder(command);
             builder.redirectErrorStream(true);
             process = builder.start();
-            final BufferedReader reader = new BufferedReader(new 
InputStreamReader(process.getInputStream()));
-
+            
+            logger.info("Started " + process);
+            
             // Start a thread to monitor the process
+            final BufferedReader reader = new BufferedReader(new 
InputStreamReader(process.getInputStream()));
             monitor = new Thread(new Runnable() {
                 public void run() {
                     try {
                         for (;;) {
                             String s = reader.readLine();
                             if (s != null) {
-                                System.out.println(s);
+                                logger.info(s);
                                 log.append(s + "<br>");
                             } else {
                                 break;
@@ -276,8 +288,12 @@
          * @throws InterruptedException
          */
         private void stop() throws InterruptedException {
+            logger.info("Stopping " + process);
+            
             process.destroy();
             monitor.join();
+            
+            logger.info("Stopped " + process);
         }
     }
     

Modified: 
incubator/tuscany/java/sca/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/webapp/NodeWebAppServletHost.java
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/webapp/NodeWebAppServletHost.java?rev=639167&r1=639166&r2=639167&view=diff
==============================================================================
--- 
incubator/tuscany/java/sca/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/webapp/NodeWebAppServletHost.java
 (original)
+++ 
incubator/tuscany/java/sca/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/webapp/NodeWebAppServletHost.java
 Wed Mar 19 23:13:17 2008
@@ -46,6 +46,7 @@
 import org.apache.tuscany.sca.host.http.ServletHost;
 import org.apache.tuscany.sca.host.http.ServletHostExtensionPoint;
 import org.apache.tuscany.sca.host.http.ServletMappingException;
+import 
org.apache.tuscany.sca.implementation.node.launcher.NodeImplementationLauncherUtil;
 import org.apache.tuscany.sca.node.Node2Exception;
 import org.apache.tuscany.sca.node.SCAClient;
 import org.apache.tuscany.sca.node.SCANode2;
@@ -59,9 +60,6 @@
 public class NodeWebAppServletHost implements ServletHost, Filter {
     private static final Logger logger = 
Logger.getLogger(NodeWebAppServletHost.class.getName());
 
-    private static final String TUSCANY_DOMAIN = "TUSCANY_DOMAIN";
-    private static final String DEFAULT_DOMAIN = "http://localhost:9990";;
-
     private static final NodeWebAppServletHost servletHost = new 
NodeWebAppServletHost();
 
     private Map<String, Servlet> servlets = new HashMap<String, Servlet>();
@@ -111,16 +109,8 @@
             nodeName = nodeName.substring(0, nodeName.length() - 1); 
         }
         
-        // Determine the node image, the domain URI can be configured
-        // using a TUSCANY_DOMAIN system property or environment variable
-        String domain = System.getProperty(TUSCANY_DOMAIN);
-        if (domain == null || domain.length() == 0) {
-            domain = System.getenv(TUSCANY_DOMAIN);
-        }
-        if (domain == null || domain.length() ==0) {
-            domain = DEFAULT_DOMAIN;
-        }
-        String nodeImage = domain + "/node-image/" + nodeName;
+        // Determine the node image URI
+        String nodeImage = 
NodeImplementationLauncherUtil.nodeImageURI(nodeName);
         
         // Create the SCA node
         SCANode2Factory nodeFactory = SCANode2Factory.newInstance();

Added: 
incubator/tuscany/java/sca/modules/node2-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/DomainNodeLauncher.java
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/node2-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/DomainNodeLauncher.java?rev=639167&view=auto
==============================================================================
--- 
incubator/tuscany/java/sca/modules/node2-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/DomainNodeLauncher.java
 (added)
+++ 
incubator/tuscany/java/sca/modules/node2-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/DomainNodeLauncher.java
 Wed Mar 19 23:13:17 2008
@@ -0,0 +1,82 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+
+package org.apache.tuscany.sca.node.launcher;
+
+import java.io.IOException;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/**
+ * Simple launcher for the SCA domain administration application. 
+ *
+ * @version $Rev$ $Date$
+ */
+public class DomainNodeLauncher {
+    
+    private final static Logger logger = 
Logger.getLogger(DomainNodeLauncher.class.getName());    
+
+    public static void main(String[] args) throws Exception {
+        logger.info("Apache Tuscany SCA Domain Administration starting...");
+
+        Class<?> adminClass;
+        Object admin;
+        try {
+            // Set up runtime classloader
+            ClassLoader runtimeClassLoader = 
NodeLauncherUtil.runtimeClassLoader(Object.class.getClassLoader());
+            if (runtimeClassLoader != null) {
+                
Thread.currentThread().setContextClassLoader(runtimeClassLoader);
+            }
+
+            // Create the daemon
+            
+            // We use Java reflection here as only the runtime class
+            // loader knows the runtime classes required by the daemon
+            String className = 
"org.apache.tuscany.sca.workspace.admin.launcher.DomainAdminLauncherBootstrap";
+            if (runtimeClassLoader != null) {
+                adminClass = Class.forName(className, true, 
runtimeClassLoader);
+            } else {
+                adminClass = Class.forName(className);
+            }
+            admin = adminClass.getConstructor().newInstance();
+            
+            // Start the daemon
+            adminClass.getMethod("start").invoke(admin);
+            
+        } catch (Exception e) {
+            logger.log(Level.SEVERE, "SCA Domain Administration could not be 
started", e);
+            throw e;
+        }
+        
+        logger.info("SCA Domain Administration started.");
+        logger.info("Press enter to shutdown.");
+        try {
+            System.in.read();
+        } catch (IOException e) {}
+
+        // Stop the daemon
+        try {
+            adminClass.getMethod("stop").invoke(admin);
+        } catch (Exception e) {
+            logger.log(Level.SEVERE, "SCA Domain Administration could not be 
stopped", e);
+            throw e;
+        }
+    }
+
+}

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

Propchange: 
incubator/tuscany/java/sca/modules/node2-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/DomainNodeLauncher.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: 
incubator/tuscany/java/sca/modules/node2-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeLauncherUtil.java
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/node2-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeLauncherUtil.java?rev=639167&r1=639166&r2=639167&view=diff
==============================================================================
--- 
incubator/tuscany/java/sca/modules/node2-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeLauncherUtil.java
 (original)
+++ 
incubator/tuscany/java/sca/modules/node2-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeLauncherUtil.java
 Wed Mar 19 23:13:17 2008
@@ -64,7 +64,8 @@
         URI uri = url.toURI();
             
         // If the launcher class is in a JAR, add all runtime JARs from 
directory containing
-        // that JAR (e.g. the Tuscany modules directory) as well as the ../lib 
directory
+        // that JAR (e.g. the Tuscany modules directory) as well as the 
../modules and
+        // ../lib directories
         String scheme = uri.getScheme();
         if (scheme.equals("jar")) {
             String path = uri.toString().substring(4);
@@ -76,21 +77,28 @@
     
             File file = new File(uri);
             if (file.exists()) {
-                File modulesDirectory = file.getParentFile();
-                if (modulesDirectory != null && modulesDirectory.exists()) {
+                File jarDirectory = file.getParentFile();
+                if (jarDirectory != null && jarDirectory.exists()) {
 
-                    // Collect JAR files in the directory containing the input 
JAR
+                    // Collect JAR files from the directory containing the 
input JAR
                     // (e.g. the Tuscany modules directory)
-                    collectJARFiles(modulesDirectory, jarURLs);
+                    collectJARFiles(jarDirectory, jarURLs);
                     
-                    File homeDirectory = modulesDirectory.getParentFile();
+                    File homeDirectory = jarDirectory.getParentFile();
                     if (homeDirectory != null && homeDirectory.exists()) {
                         
+                        // Collect JARs from the ../modules directory
+                        File modulesDirectory = new File(homeDirectory, 
"modules");
+                        if (modulesDirectory.exists() && 
!modulesDirectory.getAbsolutePath().equals(jarDirectory.getAbsolutePath())) {
+                            collectJARFiles(modulesDirectory, jarURLs);
+                        }
+
                         // Collect JARs from the ../lib directory
                         File libDirectory = new File(homeDirectory, "lib");
-                        if (libDirectory.exists() && 
!libDirectory.getAbsolutePath().equals(modulesDirectory.getAbsolutePath())) {
+                        if (libDirectory.exists() && 
!libDirectory.getAbsolutePath().equals(jarDirectory.getAbsolutePath())) {
                             collectJARFiles(libDirectory, jarURLs);
                         }
+
                     }
                 }
             }
@@ -112,9 +120,9 @@
                 collectJARFiles(homeDirectory, jarURLs);
                 
                 // Collect files under $TUSCANY_HOME/modules
-                File moduleDirectory = new File(homeDirectory, "modules");
-                if (moduleDirectory.exists()) {
-                    collectJARFiles(moduleDirectory, jarURLs);
+                File modulesDirectory = new File(homeDirectory, "modules");
+                if (modulesDirectory.exists()) {
+                    collectJARFiles(modulesDirectory, jarURLs);
                 }
     
                 // Collect files under $TUSCANY_HOME/lib

Modified: 
incubator/tuscany/java/sca/modules/node2-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeMain.java
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/node2-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeMain.java?rev=639167&r1=639166&r2=639167&view=diff
==============================================================================
--- 
incubator/tuscany/java/sca/modules/node2-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeMain.java
 (original)
+++ 
incubator/tuscany/java/sca/modules/node2-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeMain.java
 Wed Mar 19 23:13:17 2008
@@ -23,7 +23,8 @@
 /**
  * Main class for this JAR.
  * With no arguments this class launches the SCA Node Daemon.
- * With an argument it launches an SCA node. 
+ * With a "domain" argument it launches the SCA domain admin node.
+ * With any other argument it launches an SCA Node. 
  *  
  * @version $Rev$ $Date$
  */
@@ -31,7 +32,11 @@
 
     public static void main(String[] args) throws Exception {
         if (args.length != 0) {
-            NodeLauncher.main(args);
+            if (args[0].equals("domain")) {
+                DomainNodeLauncher.main(args);
+            } else {
+                NodeLauncher.main(args);
+            }
         } else {
             NodeDaemon.main(args);
         }

Modified: incubator/tuscany/java/sca/modules/workspace-admin/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/workspace-admin/pom.xml?rev=639167&r1=639166&r2=639167&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/workspace-admin/pom.xml (original)
+++ incubator/tuscany/java/sca/modules/workspace-admin/pom.xml Wed Mar 19 
23:13:17 2008
@@ -160,20 +160,4 @@
 
     </dependencies>
 
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-                <configuration>
-                    <archive>
-                        <manifest>
-                            
<mainClass>org.apache.tuscany.sca.workspace.admin.main.DomainAdminMain</mainClass>
-                        </manifest>
-                    </archive>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-
 </project>

Modified: 
incubator/tuscany/java/sca/modules/workspace-admin/src/main/java/org/apache/tuscany/sca/workspace/admin/impl/CompositeImageCollectionImpl.java
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/workspace-admin/src/main/java/org/apache/tuscany/sca/workspace/admin/impl/CompositeImageCollectionImpl.java?rev=639167&r1=639166&r2=639167&view=diff
==============================================================================
--- 
incubator/tuscany/java/sca/modules/workspace-admin/src/main/java/org/apache/tuscany/sca/workspace/admin/impl/CompositeImageCollectionImpl.java
 (original)
+++ 
incubator/tuscany/java/sca/modules/workspace-admin/src/main/java/org/apache/tuscany/sca/workspace/admin/impl/CompositeImageCollectionImpl.java
 Wed Mar 19 23:13:17 2008
@@ -118,6 +118,8 @@
             // Get the collection of required contributions
             Entry<String, Item>[] contributionEntries = 
contributionCollection.query("alldependencies=" + contributionURI);
             for (Entry<String, Item> entry: contributionEntries) {
+                Item item = entry.getData();
+                item.setContents(null);
                 entries.add(entry);
             }
 

Modified: 
incubator/tuscany/java/sca/modules/workspace-admin/src/main/resources/DomainAdmin.composite
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/workspace-admin/src/main/resources/DomainAdmin.composite?rev=639167&r1=639166&r2=639167&view=diff
==============================================================================
--- 
incubator/tuscany/java/sca/modules/workspace-admin/src/main/resources/DomainAdmin.composite
 (original)
+++ 
incubator/tuscany/java/sca/modules/workspace-admin/src/main/resources/DomainAdmin.composite
 Wed Mar 19 23:13:17 2008
@@ -141,7 +141,7 @@
     <component name="CompositeImageCollectionComponent">
         <implementation.java 
class="org.apache.tuscany.sca.workspace.admin.impl.CompositeImageCollectionImpl"/>
                <service name="ItemCollection">
-                       <t:binding.atom 
uri="http://localhost:9990/composite-image"; title="Composite Images"/>
+                       <t:binding.atom 
uri="http://localhost:9990/composite-image"; title="Install Image"/>
                </service>
                <service name="Servlet">
                        <t:binding.http uri="http://localhost:9990/node-image"/>
@@ -153,7 +153,7 @@
     <component name="NodeProcessCollectionComponent">
         <implementation.java 
class="org.apache.tuscany.sca.implementation.node.launcher.NodeProcessCollectionImpl"/>
                <service name="ItemCollection">
-                       <t:binding.atom uri="http://localhost:9990/process"; 
title="Running Nodes"/>
+                       <t:binding.atom uri="http://localhost:9990/process"; 
title="Log"/>
                </service>
     </component>
 

Modified: 
incubator/tuscany/java/sca/modules/workspace-admin/src/main/resources/cloud.html
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/workspace-admin/src/main/resources/cloud.html?rev=639167&r1=639166&r2=639167&view=diff
==============================================================================
--- 
incubator/tuscany/java/sca/modules/workspace-admin/src/main/resources/cloud.html
 (original)
+++ 
incubator/tuscany/java/sca/modules/workspace-admin/src/main/resources/cloud.html
 Wed Mar 19 23:13:17 2008
@@ -59,7 +59,7 @@
                        var entries = feed.getElementsByTagName("entry");
                        var composites = "";
                        composites += '<table width="100%">';
-                       composites += 
'<tr><th>Node</th><th>Composite</th><th>Contribution</th><th>Composite Install 
Image</th>' +
+                       composites += 
'<tr><th>Node</th><th>Composite</th><th>Contribution</th><th>Install 
Image</th>' +
                        '<th>Log</th></tr>';
                        
                        for (var i=0; i<entries.length; i++) {
@@ -121,6 +121,8 @@
                var composites  = array(document.cloudCompositeForm.composites);
                for (var i = 0; i < composites.length; i++) {
                        if (composites[i].checked) {
+                           var id = nodeNames[i];
+                               processCollection.del(id, 
stopCompositeResponse);
                            var id = composites[i].value;
                                cloudComposite.del(id, deleteCompositeResponse);
                        }
@@ -249,7 +251,7 @@
   <form name="newCompositeForm">
     <table width="100%">
     <tr><th>Add a Node</th></tr>
-    <tr><td>Add a node to the cloud. The node will run the specified SCA 
composite.</td></tr>
+    <tr><td>Add a node to the cloud. The node will run the SCA components 
declared in the specified composite.</td></tr>
     </table>
     <br>
     <table>

Modified: 
incubator/tuscany/java/sca/modules/workspace-admin/src/main/resources/composite.html
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/workspace-admin/src/main/resources/composite.html?rev=639167&r1=639166&r2=639167&view=diff
==============================================================================
--- 
incubator/tuscany/java/sca/modules/workspace-admin/src/main/resources/composite.html
 (original)
+++ 
incubator/tuscany/java/sca/modules/workspace-admin/src/main/resources/composite.html
 Wed Mar 19 23:13:17 2008
@@ -50,7 +50,9 @@
                        composites += '<tr><th>Composite</th>' +
                        '<th>Contribution</th>' +
                        '<th>Components</th>' +
-                       '<th>Composite Install Image</th></tr>';
+                       '</tr>';
+                       //'<th>Composite Install Image</th>' +
+                       
                        for (var i=0; i<entries.length; i++) {
                                var id = 
entries[i].getElementsByTagName("id")[0].firstChild.nodeValue;
                                var link = 
entries[i].getElementsByTagName("link")[0].getAttribute("href");
@@ -79,7 +81,7 @@
                                composites += '<a href=\"' + link + '\">' + 
qname + '</a></td>';
                                composites += '<td><a href="/contribution/' + 
uri + '">' + uri + '</a></td>';
                                composites += '<td class=tdw>' + components + 
'</td>';
-                               composites += '<td><a 
href="/composite-image/?composite=' + id + '"><img src="icons/feed-icon.png" 
border="0"></a></td>';
+                               //composites += '<td><a 
href="/composite-image/?composite=' + id + '"><img src="icons/feed-icon.png" 
border="0"></a></td>';
                                composites += '</tr>';
                        }
                        composites += '</table>';

Modified: 
incubator/tuscany/java/sca/modules/workspace-admin/src/main/resources/files.html
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/workspace-admin/src/main/resources/files.html?rev=639167&r1=639166&r2=639167&view=diff
==============================================================================
--- 
incubator/tuscany/java/sca/modules/workspace-admin/src/main/resources/files.html
 (original)
+++ 
incubator/tuscany/java/sca/modules/workspace-admin/src/main/resources/files.html
 Wed Mar 19 23:13:17 2008
@@ -78,10 +78,10 @@
   <br>
   <span class=hd1>
   SCA Domain<br><br>
-  Contribution File Server&nbsp;<a href="/feed/files/"><img 
src="icons/feed-icon.png" border="0"></a>
+  File Server&nbsp;<a href="/feed/files/"><img src="icons/feed-icon.png" 
border="0"></a>
   </span>
   <br><br>
-  This is a simple ATOM-based file server useful to share SCA contributions if 
you don't have an FTP, SVN or Maven repository.
+  This is a simple ATOM-based file server useful to share files if you don't 
have an FTP, SVN or Maven repository.
   <br><br>
   
   <form name="filesForm">
@@ -95,7 +95,7 @@
   <form method="post" name="uploadFileForm" enctype='multipart/form-data' 
action='/files'>
     <table width="100%">
     <tr><th>Upload File</th></tr>
-    <tr><td>Upload an SCA contribution file to the server.</td></tr>
+    <tr><td>Upload a file to the server.</td></tr>
     </table>
     <br>
     <table border="0">

Modified: 
incubator/tuscany/java/sca/modules/workspace-admin/src/main/resources/home.html
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/workspace-admin/src/main/resources/home.html?rev=639167&r1=639166&r2=639167&view=diff
==============================================================================
--- 
incubator/tuscany/java/sca/modules/workspace-admin/src/main/resources/home.html 
(original)
+++ 
incubator/tuscany/java/sca/modules/workspace-admin/src/main/resources/home.html 
Wed Mar 19 23:13:17 2008
@@ -46,5 +46,8 @@
   </table>
   </form>
 
+  <br><br><br><br><br><br><br>
+  <center>This page is under construction, searching the domain is not 
implemented yet.</center>
+  
 </body>
 </html>

Modified: 
incubator/tuscany/java/sca/samples/calculator-distributed/src/main/java/node/LaunchDomain.java
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/calculator-distributed/src/main/java/node/LaunchDomain.java?rev=639167&r1=639166&r2=639167&view=diff
==============================================================================
--- 
incubator/tuscany/java/sca/samples/calculator-distributed/src/main/java/node/LaunchDomain.java
 (original)
+++ 
incubator/tuscany/java/sca/samples/calculator-distributed/src/main/java/node/LaunchDomain.java
 Wed Mar 19 23:13:17 2008
@@ -18,7 +18,7 @@
  */
 package node;
 
-import org.apache.tuscany.sca.workspace.admin.launcher.DomainAdminLauncher;
+import org.apache.tuscany.sca.node.launcher.DomainNodeLauncher;
 
 /**
  * This server program that loads a composite to provide simple registry 
function.
@@ -27,7 +27,7 @@
  */
 public class LaunchDomain {
     public static void main(String[] args) throws Exception {
-        DomainAdminLauncher.main(args);
+        DomainNodeLauncher.main(args);
     }
 
 }

Modified: 
incubator/tuscany/java/sca/tutorial/domain/launch/LaunchTutorialDomainAdmin.java
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/domain/launch/LaunchTutorialDomainAdmin.java?rev=639167&r1=639166&r2=639167&view=diff
==============================================================================
--- 
incubator/tuscany/java/sca/tutorial/domain/launch/LaunchTutorialDomainAdmin.java
 (original)
+++ 
incubator/tuscany/java/sca/tutorial/domain/launch/LaunchTutorialDomainAdmin.java
 Wed Mar 19 23:13:17 2008
@@ -27,7 +27,7 @@
 public class LaunchTutorialDomainAdmin {
     
     public static void main(String[] args) throws Exception {
-        
org.apache.tuscany.sca.workspace.admin.launcher.DomainAdminLauncher.main(args);
+        org.apache.tuscany.sca.node.launcher.DomainNodeLauncher.main(args);
     }
 
 }

Modified: incubator/tuscany/java/sca/tutorial/domain/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/domain/pom.xml?rev=639167&r1=639166&r2=639167&view=diff
==============================================================================
--- incubator/tuscany/java/sca/tutorial/domain/pom.xml (original)
+++ incubator/tuscany/java/sca/tutorial/domain/pom.xml Wed Mar 19 23:13:17 2008
@@ -46,6 +46,7 @@
             <groupId>org.apache.tuscany.sca</groupId>
             <artifactId>tuscany-workspace-admin</artifactId>
             <version>2.0-incubating-SNAPSHOT</version>
+            <scope>runtime</scope>
         </dependency>
 
         <dependency>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to