diff options
Diffstat (limited to 'sca-java-2.x/trunk/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java')
-rw-r--r-- | sca-java-2.x/trunk/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java | 21 |
1 files changed, 16 insertions, 5 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 32aaf91b23..20984a9d6b 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 @@ -67,6 +67,7 @@ import org.apache.tuscany.sca.core.invocation.ExtensibleProxyFactory; import org.apache.tuscany.sca.core.invocation.ProxyFactory; import org.apache.tuscany.sca.core.invocation.ProxyFactoryExtensionPoint; import org.apache.tuscany.sca.deployment.Deployer; +import org.apache.tuscany.sca.extensibility.ServiceDiscovery; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.MonitorFactory; import org.apache.tuscany.sca.monitor.Problem; @@ -210,6 +211,11 @@ public class NodeFactoryImpl extends NodeFactory { } public ExtensionPointRegistry getExtensionPoints() { + if (registry == null) { + // Create extension point registry + registry = createExtensionPointRegistry(); + registry.start(); + } return registry; } @@ -219,11 +225,7 @@ public class NodeFactoryImpl extends NodeFactory { } long start = currentTimeMillis(); - if (registry == null) { - // Create extension point registry - registry = createExtensionPointRegistry(); - registry.start(); - } + getExtensionPoints(); // Use the runtime-enabled assembly factory FactoryExtensionPoint modelFactories = registry.getExtensionPoint(FactoryExtensionPoint.class); @@ -461,5 +463,14 @@ public class NodeFactoryImpl extends NodeFactory { return buf.toString(); } } + + @Override + protected void configure(Map<String, Map<String, String>> attributes) { + ServiceDiscovery discovery = getExtensionPoints().getServiceDiscovery(); + for (Map.Entry<String, Map<String, String>> e : attributes.entrySet()) { + discovery.setAttribute(e.getKey(), e.getValue()); + } + super.configure(attributes); + } } |