diff options
Diffstat (limited to '')
2 files changed, 2 insertions, 14 deletions
diff --git a/java/sca/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/processor/ComponentStub.java b/java/sca/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/processor/ComponentStub.java index f78f28edd5..5e34122b68 100644 --- a/java/sca/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/processor/ComponentStub.java +++ b/java/sca/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/processor/ComponentStub.java @@ -25,18 +25,17 @@ public class ComponentStub { private Object tie;
private Method getService;
- private Method getReference;
public ComponentStub(Object tie) {
this.tie = tie;
Class<?> tieClass = tie.getClass();
try {
getService = tieClass.getMethod("getService", new Class<?>[]{Class.class, String.class});
- getReference = tieClass.getMethod("getReference", new Class<?>[]{Class.class, String.class});
} catch (Exception e) {
throw new RuntimeException(e);
}
}
+
public Object getService(Class<?> type, String name) {
try {
@@ -46,15 +45,4 @@ public class ComponentStub { throw new RuntimeException(e);
}
}
-
- public Object getReference(Class<?> type, String name) {
- try {
-
- return getReference.invoke(tie, type, name);
-
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- }
-
}
diff --git a/java/sca/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/processor/ReferenceAnnotationProcessor.java b/java/sca/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/processor/ReferenceAnnotationProcessor.java index d86d074a54..96b9622891 100644 --- a/java/sca/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/processor/ReferenceAnnotationProcessor.java +++ b/java/sca/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/processor/ReferenceAnnotationProcessor.java @@ -151,7 +151,7 @@ public class ReferenceAnnotationProcessor implements BeanPostProcessor { */
public void injectReference(Object bean, PropertyDescriptor pd, String name) {
- Object referenceObj = component.getReference(pd.getPropertyType(), name);
+ Object referenceObj = component.getService(pd.getPropertyType(), name);
if (referenceObj != null) {
try {
|