diff options
Diffstat (limited to 'java/sca/modules/node-impl/src')
-rw-r--r-- | java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java b/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java index 768d5a63d7..4de400db11 100644 --- a/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java +++ b/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java @@ -124,16 +124,22 @@ public class NodeImpl implements Node, Client { this.compositeActivator = utilities.getUtility(CompositeActivator.class); try { Monitor monitor = manager.monitorFactory.createMonitor(); - monitor.reset(); - ProcessorContext context = new ProcessorContext(monitor); - if (contributions == null) { - contributions = manager.loadContributions(configuration, context); + // Set up the thead context monitor + Monitor tcm = manager.monitorFactory.setContextMonitor(monitor); + try { + if (contributions == null) { + contributions = manager.loadContributions(configuration, context); + } + domainComposite = manager.configureNode(configuration, contributions, context); + + this.compositeContext = + new CompositeContextImpl(manager.extensionPoints, endpointRegistry, domainComposite); + } finally { + // Reset the thread context monitor + manager.monitorFactory.setContextMonitor(tcm); } - domainComposite = manager.configureNode(configuration, contributions, context); - - this.compositeContext = new CompositeContextImpl(manager.extensionPoints, endpointRegistry, domainComposite); // Activate the composite compositeActivator.activate(compositeContext, domainComposite); |