summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/implementation-java-runtime/src
diff options
context:
space:
mode:
Diffstat (limited to 'java/sca/modules/implementation-java-runtime/src')
-rw-r--r--java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/injection/JavaPropertyValueObjectFactory.java5
-rw-r--r--java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaComponentContextProvider.java7
-rw-r--r--java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/module/JavaRuntimeModuleActivator.java2
3 files changed, 7 insertions, 7 deletions
diff --git a/java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/injection/JavaPropertyValueObjectFactory.java b/java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/injection/JavaPropertyValueObjectFactory.java
index 1eac9ce7a6..3618fa3477 100644
--- a/java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/injection/JavaPropertyValueObjectFactory.java
+++ b/java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/injection/JavaPropertyValueObjectFactory.java
@@ -26,6 +26,8 @@ import java.util.StringTokenizer;
import org.apache.tuscany.sca.assembly.ComponentProperty;
import org.apache.tuscany.sca.assembly.Property;
import org.apache.tuscany.sca.context.PropertyValueFactory;
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.core.factory.ObjectCreationException;
import org.apache.tuscany.sca.core.factory.ObjectFactory;
import org.apache.tuscany.sca.databinding.Mediator;
@@ -52,6 +54,9 @@ public class JavaPropertyValueObjectFactory implements PropertyValueFactory {
private Mediator mediator = null;
private boolean isSimpleType;
+ public JavaPropertyValueObjectFactory(ExtensionPointRegistry registry) {
+ this.mediator = registry.getExtensionPoint(UtilityExtensionPoint.class).getUtility(Mediator.class);
+ }
public JavaPropertyValueObjectFactory(Mediator mediator) {
this.mediator = mediator;
}
diff --git a/java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaComponentContextProvider.java b/java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaComponentContextProvider.java
index ca42c69d4e..809b7c18b8 100644
--- a/java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaComponentContextProvider.java
+++ b/java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaComponentContextProvider.java
@@ -60,7 +60,6 @@ import org.apache.tuscany.sca.interfacedef.Operation;
import org.apache.tuscany.sca.interfacedef.java.impl.JavaInterfaceUtil;
import org.apache.tuscany.sca.invocation.Invoker;
import org.apache.tuscany.sca.runtime.RuntimeComponent;
-import org.apache.tuscany.sca.runtime.RuntimeComponentContext;
import org.apache.tuscany.sca.runtime.RuntimeComponentReference;
import org.apache.tuscany.sca.runtime.RuntimeWire;
import org.osoa.sca.CallableReference;
@@ -262,12 +261,6 @@ public class JavaComponentContextProvider {
}
}
- // We need to set the PropertyValueFactory on the ComponentContextImpl
- // so the ComponentContext can "de-marshal" the property type to a value
- // when the getProperty() method is called
- RuntimeComponentContext ccImpl = (RuntimeComponentContext)component.getComponentContext();
- ccImpl.setPropertyValueFactory(propertyValueFactory);
-
//setUpPolicyHandlers();
}
diff --git a/java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/module/JavaRuntimeModuleActivator.java b/java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/module/JavaRuntimeModuleActivator.java
index 9dc1d8d21a..1ea3546adb 100644
--- a/java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/module/JavaRuntimeModuleActivator.java
+++ b/java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/module/JavaRuntimeModuleActivator.java
@@ -77,7 +77,9 @@ public class JavaRuntimeModuleActivator implements ModuleActivator {
DataBindingExtensionPoint dataBindings = registry.getExtensionPoint(DataBindingExtensionPoint.class);
TransformerExtensionPoint transformers = registry.getExtensionPoint(TransformerExtensionPoint.class);
MediatorImpl mediator = new MediatorImpl(dataBindings, transformers);
+ utilities.addUtility(mediator);
JavaPropertyValueObjectFactory factory = new JavaPropertyValueObjectFactory(mediator);
+ factories.addFactory(factory);
ContextFactoryExtensionPoint contextFactories = registry.getExtensionPoint(ContextFactoryExtensionPoint.class);
ComponentContextFactory componentContextFactory = contextFactories.getFactory(ComponentContextFactory.class);