summaryrefslogtreecommitdiffstats
path: root/java/sca
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2009-05-02 06:18:57 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2009-05-02 06:18:57 +0000
commit23127e4767510f8b506980c5da8fb8f6b86b0118 (patch)
tree5af4d6702ef2fae66ce6b73ce0c88784b2400862 /java/sca
parent3ca8a1eec06e82a603c03e1d2aaca4669d7d78ed (diff)
Get the Spring reference and property annotations going
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@770895 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca')
-rw-r--r--java/sca/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/processor/ComponentStub.java14
-rw-r--r--java/sca/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/processor/ReferenceAnnotationProcessor.java2
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 {