summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/core
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-03-16 16:45:05 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-03-16 16:45:05 +0000
commit4c0d03c1ba996b758e50476e1d7d253e6a6050d0 (patch)
treed72e5002e4101a9db9fb1da6af908cba2dffa11b /java/sca/modules/core
parent6fa96a3daf438c36f802604ba8a1f6a62f64cdaf (diff)
Changes to allow $self$ references to have endpoint references. However main change is in ComponentContext which is not ready to go in yet.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@754951 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/core')
-rw-r--r--java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/CompositeActivatorImpl2.java18
1 files changed, 10 insertions, 8 deletions
diff --git a/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/CompositeActivatorImpl2.java b/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/CompositeActivatorImpl2.java
index 3f93bf7cdd..b84717467f 100644
--- a/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/CompositeActivatorImpl2.java
+++ b/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/CompositeActivatorImpl2.java
@@ -704,16 +704,18 @@ public class CompositeActivatorImpl2 implements CompositeActivator {
// if there is a binding an endpoint has been found for the endpoint reference
if (endpointReference.getBinding() != null){
- // add the binding provider
+ // add the binding provider. This is apparently a repeat
+ // of previous configuration as self references are created
+ // on the fly and miss the previous point where providers are added
RuntimeComponentReference runtimeRef = (RuntimeComponentReference)componentReference;
- final ReferenceBindingProvider bindingProvider = runtimeRef.getBindingProvider(endpointReference.getBinding());
-/* TODO - Is this actually required
- if (bindingProvider == null) {
- bindingProvider = addReferenceBindingProvider(component, componentReference, endpointReference.getBinding());
+ if (runtimeRef.getBindingProvider(endpointReference.getBinding()) == null) {
+ addReferenceBindingProvider(component, componentReference, endpointReference.getBinding());
}
-*/
- // start the binding provider
+
+ // start the binding provider
+ final ReferenceBindingProvider bindingProvider = runtimeRef.getBindingProvider(endpointReference.getBinding());
+
if (bindingProvider != null) {
// Allow bindings to add shutdown hooks. Requires RuntimePermission shutdownHooks in policy.
AccessController.doPrivileged(new PrivilegedAction<Object>() {
@@ -797,7 +799,7 @@ public class CompositeActivatorImpl2 implements CompositeActivator {
*/
// create the wire
- RuntimeWire wire = new RuntimeWireImpl2(false,
+ RuntimeWire wire = new RuntimeWireImpl2(true,
endpointReference,
endpoint,
interfaceContractMapper,