summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/node-impl/src
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2010-05-18 13:10:53 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2010-05-18 13:10:53 +0000
commit8fa0e586a6eb64f30266ad4f5faeb586dea3d26b (patch)
treef2d5f61f04aa33d7f6b97607bd5331e3469a78f0 /sca-java-2.x/trunk/modules/node-impl/src
parent9005ea23c3238a768908f39c7374f4c73704b647 (diff)
Updaqte to only consider Nodes in the same domain
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@945641 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/node-impl/src')
-rw-r--r--sca-java-2.x/trunk/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/sca-java-2.x/trunk/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java b/sca-java-2.x/trunk/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java
index bf2b9ec79b..fc975c0072 100644
--- a/sca-java-2.x/trunk/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java
+++ b/sca-java-2.x/trunk/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java
@@ -157,9 +157,11 @@ public class NodeFactoryImpl extends NodeFactory {
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 NodeFactory {
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 NodeFactory {
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());
}
}