summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2010-07-05 10:16:29 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2010-07-05 10:16:29 +0000
commit88cf2331cfe1fd3e0503c0e2391d96cbccc60089 (patch)
tree82beb0c2b254a02fcd606b9f754bd4b31b46c682 /sca-java-2.x/trunk/modules
parentc5a55dc9a5d9a2faf10800f25e74df284207bc09 (diff)
Little bit of tidying. No function change.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@960521 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules')
-rw-r--r--sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/CompositeActivatorImpl.java45
1 files changed, 21 insertions, 24 deletions
diff --git a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/CompositeActivatorImpl.java b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/CompositeActivatorImpl.java
index e7d2d5d841..afd62edb8b 100644
--- a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/CompositeActivatorImpl.java
+++ b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/CompositeActivatorImpl.java
@@ -279,7 +279,6 @@ public class CompositeActivatorImpl implements CompositeActivator {
activate(compositeContext, (RuntimeEndpointReference) epr);
}
- // TODO reference wires are added at component start for some reason
}
public void deactivate(RuntimeComponent component, RuntimeComponentReference reference) {
@@ -290,6 +289,27 @@ public class CompositeActivatorImpl implements CompositeActivator {
deactivate((RuntimeEndpointReference)endpointReference);
}
}
+
+ public void activate(CompositeContext compositeContext, RuntimeEndpointReference epr) {
+ // create the wire
+ // null endpoint passed in here as the endpoint reference may
+ // not be resolved yet
+ epr.bind(compositeContext);
+
+ ComponentReference reference = epr.getReference();
+ InterfaceContract sourceContract = epr.getComponentTypeReferenceInterfaceContract();
+
+ // TODO - EPR - interface contract seems to be null in the implementation.web
+ // case. Not introspecting the CT properly?
+ if (sourceContract == null){
+ // TODO - Can't do this with move of matching to wire
+ // take the contract from the service to which the reference is connected
+ sourceContract = ((RuntimeEndpoint) epr.getTargetEndpoint()).getComponentTypeServiceInterfaceContract();
+ reference.setInterfaceContract(sourceContract);
+ }
+
+ // endpointReference.setInterfaceContract(sourceContract.makeUnidirectional(false));
+ }
public void deactivate(RuntimeEndpointReference endpointReference) {
endpointReference.unbind();
@@ -573,27 +593,4 @@ public class CompositeActivatorImpl implements CompositeActivator {
}
}
}
-
- public void activate(CompositeContext compositeContext, RuntimeEndpointReference epr) {
- // create the wire
- // null endpoint passed in here as the endpoint reference may
- // not be resolved yet
- epr.bind(compositeContext);
-
- ComponentReference reference = epr.getReference();
- InterfaceContract sourceContract = epr.getComponentTypeReferenceInterfaceContract();
-
- // TODO - EPR - interface contract seems to be null in the implementation.web
- // case. Not introspecting the CT properly?
- if (sourceContract == null){
- // TODO - Can't do this with move of matching to wire
- // take the contract from the service to which the reference is connected
- sourceContract = ((RuntimeEndpoint) epr.getTargetEndpoint()).getComponentTypeServiceInterfaceContract();
- reference.setInterfaceContract(sourceContract);
- }
-
- // endpointReference.setInterfaceContract(sourceContract.makeUnidirectional(false));
- }
-
-
}