tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r945641 - /tuscany/sca-java-2.x/trunk/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java
Date Tue, 18 May 2010 13:10:53 GMT
Author: antelder
Date: Tue May 18 13:10:53 2010
New Revision: 945641

URL: http://svn.apache.org/viewvc?rev=945641&view=rev
Log:
Updaqte to only consider Nodes in the same domain

Modified:
    tuscany/sca-java-2.x/trunk/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java

Modified: tuscany/sca-java-2.x/trunk/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java?rev=945641&r1=945640&r2=945641&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java
Tue May 18 13:10:53 2010
@@ -157,9 +157,11 @@ public class NodeFactoryImpl extends Nod
 
     public List<Node> getNodesInDomain(String domainName) {
         List<Node> domainNodes = new ArrayList<Node>();
-        for (Node n : nodes.values()) {
-            if (domainName.equals(((NodeImpl)n).getConfiguration().getDomainURI())) {
-                domainNodes.add(n);
+        if (nodes != null) {
+            for (Node n : nodes.values()) {
+                if (domainName.equals(((NodeImpl)n).getConfiguration().getDomainURI())) {
+                    domainNodes.add(n);
+                }
             }
         }
         return domainNodes;
@@ -302,7 +304,7 @@ public class NodeFactoryImpl extends Nod
         for (BindingConfiguration config : configuration.getBindings()) {
             bindingBaseURIs.put(config.getBindingType(), config.getBaseURIs());
         }
-        List<Contribution> allContributions = getAllContributions();
+        List<Contribution> allContributions = getAllContributions(configuration.getDomainURI());
         
         Composite domainComposite = deployer.build(contributions, allContributions, bindingBaseURIs,
monitor);
         analyzeProblems(monitor);
@@ -312,10 +314,10 @@ public class NodeFactoryImpl extends Nod
         return domainComposite;
     }
     
-    private List<Contribution> getAllContributions() {
+    private List<Contribution> getAllContributions(String domainName) {
         List<Contribution> contributions = new ArrayList<Contribution>();
         for (NodeFactory f : getNodeFactories()) {
-            for (Node node : ((NodeFactoryImpl)f).getNodes().values()) {
+            for (Node node : ((NodeFactoryImpl)f).getNodesInDomain(domainName)) {
                 contributions.addAll(((NodeImpl)node).getContributions());            
             }
         }



Mime
View raw message