tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rf...@apache.org
Subject svn commit: r829977 - /tuscany/branches/sca-java-1.5.2/modules/node-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeLauncher.java
Date Mon, 26 Oct 2009 21:21:43 GMT
Author: rfeng
Date: Mon Oct 26 21:21:42 2009
New Revision: 829977

URL: http://svn.apache.org/viewvc?rev=829977&view=rev
Log:
Merge the launcher enhancement from 1.x

Modified:
    tuscany/branches/sca-java-1.5.2/modules/node-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeLauncher.java

Modified: tuscany/branches/sca-java-1.5.2/modules/node-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeLauncher.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.5.2/modules/node-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeLauncher.java?rev=829977&r1=829976&r2=829977&view=diff
==============================================================================
--- tuscany/branches/sca-java-1.5.2/modules/node-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeLauncher.java
(original)
+++ tuscany/branches/sca-java-1.5.2/modules/node-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeLauncher.java
Mon Oct 26 21:21:42 2009
@@ -125,13 +125,21 @@
                     logger.info("SCA Node configuration: " + configurationURI);
                     node = launcher.createNodeFromURL(configurationURI);
                 } else {
-                    
+
                     // Create a node from a composite URI and a contribution location
                     String compositeURI = args[0];
-                    String contributionLocation = args[1];
-                    logger.info("SCA composite: " + compositeURI);
-                    logger.info("SCA contribution: " + contributionLocation);
-                    node = launcher.createNode(compositeURI, new Contribution("default",
contributionLocation));
+                    if ("-".equals(compositeURI)) {
+                        compositeURI = null;
+                    } else {
+                        logger.info("SCA composite: " + compositeURI);
+                    }
+                    Contribution contributions[] = new Contribution[args.length - 1];
+                    for (int i = 1; i < args.length; i++) {
+                        String contributionLocation = args[i];
+                        logger.info("SCA contribution: " + contributionLocation);
+                        contributions[i - 1] = new Contribution("contribution" + (i - 1),
contributionLocation);
+                    }
+                    node = launcher.createNode(compositeURI, contributions);
                 }
                 
                 // Start the node



Mime
View raw message