From b00b05494396c0cfd71cb0587cc5d2086c4f381c Mon Sep 17 00:00:00 2001 From: antelder Date: Wed, 9 Mar 2011 12:24:47 +0000 Subject: Performance enhancement - only initilize all the factories the first time git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1079773 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java index 7dc1a7639a..38d9973e37 100644 --- a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java +++ b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java @@ -185,6 +185,11 @@ public class RuntimeEndpointImpl extends EndpointImpl implements RuntimeEndpoint if (compositeContext == null) { compositeContext = new CompositeContext(registry, endpointRegistry); } + + // if interfaceContractMapper is already initialized then all the rest will be too + if (interfaceContractMapper != null) { + return; + } this.registry = registry; UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class); this.interfaceContractMapper = utilities.getUtility(InterfaceContractMapper.class); -- cgit v1.2.3