summaryrefslogtreecommitdiffstats
path: root/branches/sca-java-1.x/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/runtime/context/SpringImplementationStub.java
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--branches/sca-java-1.x/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/runtime/context/SpringImplementationStub.java24
1 files changed, 18 insertions, 6 deletions
diff --git a/branches/sca-java-1.x/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/runtime/context/SpringImplementationStub.java b/branches/sca-java-1.x/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/runtime/context/SpringImplementationStub.java
index 3139c9c500..b123be8b5c 100644
--- a/branches/sca-java-1.x/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/runtime/context/SpringImplementationStub.java
+++ b/branches/sca-java-1.x/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/runtime/context/SpringImplementationStub.java
@@ -6,15 +6,15 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
+ * under the License.
*/
package org.apache.tuscany.sca.implementation.spring.runtime.context;
@@ -29,7 +29,7 @@ import org.springframework.beans.factory.NoSuchBeanDefinitionException;
* It enables the Spring code in the runtime module to invoke methods on a
* Tuscany SpringImplementation without the Spring runtime module
* needing to know about any Tuscany classes. See the SpringImplementationTie class
- * in the implementation-spring module for what the tie does.
+ * in the implementation-spring module for what the tie does.
*/
public class SpringImplementationStub {
@@ -39,7 +39,8 @@ public class SpringImplementationStub {
Method getComponentName;
Method getComponentTie;
Method getPropertyValueTie;
-
+ Method getClassLoader;
+
public SpringImplementationStub(Object tie) {
this.tie = tie;
Class<?> tieClass = tie.getClass();
@@ -49,11 +50,12 @@ public class SpringImplementationStub {
getComponentName = tieClass.getMethod("getComponentName");
getComponentTie = tieClass.getMethod("getComponentTie");
getPropertyValueTie = tieClass.getMethod("getPropertyValueTie");
+ getClassLoader = tieClass.getMethod("getClassLoader");
} catch (Exception e) {
throw new RuntimeException(e);
}
}
-
+
public String getURI() {
try {
@@ -114,4 +116,14 @@ public class SpringImplementationStub {
throw new RuntimeException(e);
}
}
+
+ public ClassLoader getClassLoader() {
+ try {
+
+ return (ClassLoader) getClassLoader.invoke(tie);
+
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
}