diff options
Diffstat (limited to 'branches/sca-java-1.x/modules/implementation-java-runtime')
-rw-r--r-- | branches/sca-java-1.x/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaComponentContextProvider.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/branches/sca-java-1.x/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaComponentContextProvider.java b/branches/sca-java-1.x/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaComponentContextProvider.java index 29e02da648..65bff6efdb 100644 --- a/branches/sca-java-1.x/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaComponentContextProvider.java +++ b/branches/sca-java-1.x/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaComponentContextProvider.java @@ -51,6 +51,7 @@ import org.apache.tuscany.sca.core.invocation.WireObjectFactory; import org.apache.tuscany.sca.core.scope.ScopeContainer; import org.apache.tuscany.sca.core.scope.TargetResolutionException; import org.apache.tuscany.sca.databinding.DataBindingExtensionPoint; +import org.apache.tuscany.sca.implementation.java.context.InstanceFactory; import org.apache.tuscany.sca.implementation.java.impl.JavaConstructorImpl; import org.apache.tuscany.sca.implementation.java.impl.JavaElementImpl; import org.apache.tuscany.sca.implementation.java.impl.JavaResourceImpl; @@ -78,6 +79,7 @@ public class JavaComponentContextProvider { private RuntimeComponent component; private JavaInstanceFactoryProvider<?> instanceFactoryProvider; private ProxyFactory proxyFactory; + private InstanceFactory instanceFactory; public JavaComponentContextProvider(RuntimeComponent component, JavaInstanceFactoryProvider configuration, @@ -99,7 +101,7 @@ public class JavaComponentContextProvider { } InstanceWrapper<?> createInstanceWrapper() throws ObjectCreationException { - return instanceFactoryProvider.createFactory().newInstance(); + return instanceFactory.newInstance(); } void configureProperties(List<ComponentProperty> definedProperties) { @@ -272,6 +274,8 @@ public class JavaComponentContextProvider { ccImpl.setPropertyValueFactory(propertyValueFactory); //setUpPolicyHandlers(); + this.instanceFactory = instanceFactoryProvider.createFactory(); + } void addResourceFactory(String name, ObjectFactory<?> factory) { |