diff options
author | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2008-12-05 22:32:00 +0000 |
---|---|---|
committer | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2008-12-05 22:32:00 +0000 |
commit | 960ef736d702d87ede50b097e191f6336c9be7a4 (patch) | |
tree | c2a207865d919ce42b16ee2179c68be645f15b3b /java/sca/modules/implementation-java-runtime/src | |
parent | 592d4446a5c63ecd06eea498ef63bd6b8ff10766 (diff) |
Further cleanup for ComponentContext, CompositeContext
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@723904 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/implementation-java-runtime/src')
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); |