summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/builder/src
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2010-05-17 17:27:54 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2010-05-17 17:27:54 +0000
commit53b98fd7f18aae43f32a3ed11131b5876e90f887 (patch)
tree2ff5561feb0f7e20e6ac8c21878d44b114d4cea2 /sca-java-2.x/trunk/modules/builder/src
parent4bb8e8e5de317bb63ace92ed763557f92a3195f4 (diff)
Make sure callback endpoints are created
When a component is invoked from a non bidirectional interface, inject null to the fields/setters with @Callback git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@945259 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/builder/src')
-rw-r--r--sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/EndpointReferenceBuilderImpl.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/EndpointReferenceBuilderImpl.java b/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/EndpointReferenceBuilderImpl.java
index 2dd21fe3e6..d7c345b9f1 100644
--- a/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/EndpointReferenceBuilderImpl.java
+++ b/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/EndpointReferenceBuilderImpl.java
@@ -314,6 +314,13 @@ public class EndpointReferenceBuilderImpl {
endpointRef.setTargetEndpoint(createEndpoint(false));
endpointRef.setStatus(EndpointReference.Status.RESOLVED_BINDING);
}
+
+ if (reference.getCallbackService() != null) {
+ Endpoint callbackEndpoint =
+ createEndpoint(component, reference.getCallbackService(), false);
+ endpointRef.setCallbackEndpoint(callbackEndpoint);
+ }
+
reference.getEndpointReferences().add(endpointRef);
continue;
} // end if
@@ -345,6 +352,11 @@ public class EndpointReferenceBuilderImpl {
}
endpointRef.setTargetEndpoint(endpoint);
+ if (reference.getCallbackService() != null) {
+ Endpoint callbackEndpoint =
+ createEndpoint(component, reference.getCallbackService(), false);
+ endpointRef.setCallbackEndpoint(callbackEndpoint);
+ }
reference.getEndpointReferences().add(endpointRef);
}
}