diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2011-03-08 14:20:41 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2011-03-08 14:20:41 +0000 |
commit | 9ce225ce4ee13036a07cfa68bdd42214dd5b1c4f (patch) | |
tree | a57cf015525789fc50ca7f39b04d6988240816ed /sca-java-2.x/trunk/modules/node-impl | |
parent | 49b878b1b0f2e52bbd5282c22ac32a68e1e8736c (diff) |
TUSCANY-3842 only calculate the domain composite the first time a node is started and when the contributions are loaded. I don't see why the domain composite, within a node, would change when we are not reloading the contributions.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1079366 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/node-impl')
-rw-r--r-- | sca-java-2.x/trunk/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/sca-java-2.x/trunk/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java b/sca-java-2.x/trunk/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java index 8197c1b9b4..350412257c 100644 --- a/sca-java-2.x/trunk/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java +++ b/sca-java-2.x/trunk/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java @@ -118,18 +118,22 @@ public class NodeImpl implements Node { // Set up the thead context monitor Monitor tcm = nodeFactory.monitorFactory.setContextMonitor(monitor); try { + // Use the lack of the contributions collection as an indicator for when the node + // is being started for the first time. If it is the first time do all the work + // to read the contributions and create the domain composite if (contributions == null) { contributions = nodeFactory.loadContributions(configuration, context); + + domainComposite = nodeFactory.configureNode(configuration, contributions, context); + + this.compositeContext = + new CompositeContext(nodeFactory.registry, + endpointRegistry, + domainComposite, + configuration.getDomainURI(), + configuration.getURI(), + nodeFactory.getDeployer().getSystemDefinitions()); } - domainComposite = nodeFactory.configureNode(configuration, contributions, context); - - this.compositeContext = - new CompositeContext(nodeFactory.registry, - endpointRegistry, - domainComposite, - configuration.getDomainURI(), - configuration.getURI(), - nodeFactory.getDeployer().getSystemDefinitions()); } finally { // Reset the thread context monitor @@ -203,10 +207,12 @@ public class NodeImpl implements Node { } // end if nodeFactory.removeNode(configuration); +/* this.compositeActivator = null; this.proxyFactory = null; this.domainComposite = null; this.compositeContext = null; +*/ ThreadMessageContext.removeMessageContext(); |