You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by sl...@apache.org on 2011/03/08 15:20:41 UTC
svn commit: r1079366 -
/tuscany/sca-java-2.x/trunk/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java
Author: slaws
Date: Tue Mar 8 14:20:41 2011
New Revision: 1079366
URL: http://svn.apache.org/viewvc?rev=1079366&view=rev
Log:
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.
Modified:
tuscany/sca-java-2.x/trunk/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java
Modified: tuscany/sca-java-2.x/trunk/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.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/NodeImpl.java?rev=1079366&r1=1079365&r2=1079366&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java Tue Mar 8 14:20:41 2011
@@ -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();