diff options
author | ramkumar <ramkumar@13f79535-47bb-0310-9956-ffa450edef68> | 2009-08-11 16:48:29 +0000 |
---|---|---|
committer | ramkumar <ramkumar@13f79535-47bb-0310-9956-ffa450edef68> | 2009-08-11 16:48:29 +0000 |
commit | 52ce80378090f15b7b658ff526e29cc1462f8d7b (patch) | |
tree | 214d974da670e6586945406296fe76fb58b7760a /branches | |
parent | 7d824227f4400206ceb3849fb01d461d0b42a9c3 (diff) |
Fixes for TUSCANY-3202
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@803204 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
12 files changed, 30 insertions, 14 deletions
diff --git a/branches/sca-java-1.5.1/itest/spring/src/main/java/helloworld/HelloWorld.java b/branches/sca-java-1.5.1/itest/spring/src/main/java/helloworld/HelloWorld.java index e0987096f6..46f8facf78 100644 --- a/branches/sca-java-1.5.1/itest/spring/src/main/java/helloworld/HelloWorld.java +++ b/branches/sca-java-1.5.1/itest/spring/src/main/java/helloworld/HelloWorld.java @@ -19,15 +19,12 @@ package helloworld;
-import org.osoa.sca.annotations.Remotable;
-
/**
* Interface for the "hello world" service - predictably simple with a single operation
* "sayHello"
*
* @version $Rev$ $Date$
*/
-@Remotable
public interface HelloWorld {
String sayHello(String s);
diff --git a/branches/sca-java-1.5.1/itest/spring/src/main/resources/context/imports/META-INF/spring/CalculatorService-context.xml b/branches/sca-java-1.5.1/itest/spring/src/main/resources/context/imports/META-INF/spring/CalculatorService-context.xml index 7c84965629..4532810433 100644 --- a/branches/sca-java-1.5.1/itest/spring/src/main/resources/context/imports/META-INF/spring/CalculatorService-context.xml +++ b/branches/sca-java-1.5.1/itest/spring/src/main/resources/context/imports/META-INF/spring/CalculatorService-context.xml @@ -35,5 +35,8 @@ <sca:reference name="subtractService" type="calculator.SubtractService"/>
<sca:reference name="multiplyService" type="calculator.MultiplyService"/>
<sca:reference name="divideService" type="calculator.DivideService"/>
+
+ <bean id="AddServiceBean" class="calculator.AddServiceImpl">
+ </bean>
</beans>
diff --git a/branches/sca-java-1.5.1/itest/spring/src/main/resources/context/imports/META-INF/spring/SpringImport-context.xml b/branches/sca-java-1.5.1/itest/spring/src/main/resources/context/imports/META-INF/spring/SpringImport-context.xml index 3faed92fd2..f99eacf9d5 100644 --- a/branches/sca-java-1.5.1/itest/spring/src/main/resources/context/imports/META-INF/spring/SpringImport-context.xml +++ b/branches/sca-java-1.5.1/itest/spring/src/main/resources/context/imports/META-INF/spring/SpringImport-context.xml @@ -26,4 +26,16 @@ <import resource="CalculatorService-context.xml"/>
-</beans>
\ No newline at end of file + <bean id="CalculatorServiceBean" class="calculator.CalculatorServiceImpl">
+ <property name="addService" ref="addService"/>
+ <property name="subtractService" ref="subtractService"/>
+ <property name="multiplyService" ref="multiplyService"/>
+ <property name="divideService" ref="divideService"/>
+ </bean>
+
+ <sca:reference name="addService" type="calculator.AddService"/>
+ <sca:reference name="subtractService" type="calculator.SubtractService"/>
+ <sca:reference name="multiplyService" type="calculator.MultiplyService"/>
+ <sca:reference name="divideService" type="calculator.DivideService"/>
+
+</beans>
diff --git a/branches/sca-java-1.5.1/itest/spring/src/main/resources/location/folder/SpringFolderLocation.composite b/branches/sca-java-1.5.1/itest/spring/src/main/resources/location/folder/SpringFolderLocation.composite index 50d6456737..c6f2111d0e 100644 --- a/branches/sca-java-1.5.1/itest/spring/src/main/resources/location/folder/SpringFolderLocation.composite +++ b/branches/sca-java-1.5.1/itest/spring/src/main/resources/location/folder/SpringFolderLocation.composite @@ -28,11 +28,11 @@ <component name="ClientComponent">
<implementation.java class="helloworld.HelloWorldProxy"/>
- <reference name="delegate" target="HelloWorldComponent"/>
+ <reference name="delegate" target="HelloWorldComponent/testBean1"/>
</component>
<component name="HelloWorldComponent">
- <implementation.spring location="springapp"/>
+ <implementation.spring location="springapp"/>
<property name="TestProperty">Hello</property>
</component>
diff --git a/branches/sca-java-1.5.1/itest/spring/src/main/resources/location/jar/SpringJarLocation.composite b/branches/sca-java-1.5.1/itest/spring/src/main/resources/location/jar/SpringJarLocation.composite index b0b191801d..7b16c221cf 100644 --- a/branches/sca-java-1.5.1/itest/spring/src/main/resources/location/jar/SpringJarLocation.composite +++ b/branches/sca-java-1.5.1/itest/spring/src/main/resources/location/jar/SpringJarLocation.composite @@ -28,7 +28,7 @@ <component name="ClientComponent">
<implementation.java class="helloworld.HelloWorldProxy"/>
- <reference name="delegate" target="HelloWorldComponent"/>
+ <reference name="delegate" target="HelloWorldComponent/testBean1"/>
</component>
<component name="HelloWorldComponent">
diff --git a/branches/sca-java-1.5.1/itest/spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorld.composite b/branches/sca-java-1.5.1/itest/spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorld.composite index bd050135da..7d72242df3 100644 --- a/branches/sca-java-1.5.1/itest/spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorld.composite +++ b/branches/sca-java-1.5.1/itest/spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorld.composite @@ -21,8 +21,8 @@ name="SpringHelloWorld"> <component name="ClientComponent"> - <implementation.java class="org.apache.tuscany.sca.itest.spring.HelloWorldProxy"/> - <reference name="delegate" target="HelloWorldComponent"/> + <implementation.java class="helloworld.HelloWorldProxy"/> + <reference name="delegate" target="HelloWorldComponent/testBean"/> </component> <component name="HelloWorldComponent"> diff --git a/branches/sca-java-1.5.1/itest/spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringHelloWorld.composite b/branches/sca-java-1.5.1/itest/spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringHelloWorld.composite index 1047d2a210..847056adf6 100644 --- a/branches/sca-java-1.5.1/itest/spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringHelloWorld.composite +++ b/branches/sca-java-1.5.1/itest/spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringHelloWorld.composite @@ -21,7 +21,7 @@ name="SpringHelloWorld"> <component name="ClientComponent"> - <implementation.java class="org.apache.tuscany.sca.itest.spring.HelloWorldProxy"/> + <implementation.java class="helloworld.HelloWorldProxy"/> <reference name="delegate" target="HelloWorldComponent"/> </component> diff --git a/branches/sca-java-1.5.1/itest/spring/src/test/java/context/imports/CalculatorClient.java b/branches/sca-java-1.5.1/itest/spring/src/test/java/context/imports/CalculatorClient.java index d3bd190cc0..12ced16785 100644 --- a/branches/sca-java-1.5.1/itest/spring/src/test/java/context/imports/CalculatorClient.java +++ b/branches/sca-java-1.5.1/itest/spring/src/test/java/context/imports/CalculatorClient.java @@ -41,7 +41,7 @@ public class CalculatorClient { node.start();
CalculatorService calculatorService =
- ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+ ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent/CalculatorServiceBean");
System.out.println("3 + 2=" + calculatorService.add(3, 2));
System.out.println("3 - 2=" + calculatorService.subtract(3, 2));
diff --git a/branches/sca-java-1.5.1/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/HelloWorld.java b/branches/sca-java-1.5.1/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/HelloWorld.java index 3957e49bf3..1405310100 100644 --- a/branches/sca-java-1.5.1/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/HelloWorld.java +++ b/branches/sca-java-1.5.1/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/HelloWorld.java @@ -19,14 +19,11 @@ package org.apache.tuscany.sca.itest.spring; -import org.osoa.sca.annotations.Remotable; - /** * Interface for the "hello world" service - predictably simple with a single operation * "sayHello" * */ -@Remotable public interface HelloWorld { public String sayHello(String s); diff --git a/branches/sca-java-1.5.1/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/TestHelloWorldBean.java b/branches/sca-java-1.5.1/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/TestHelloWorldBean.java index fa7967c964..45b47b47a8 100644 --- a/branches/sca-java-1.5.1/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/TestHelloWorldBean.java +++ b/branches/sca-java-1.5.1/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/TestHelloWorldBean.java @@ -18,6 +18,8 @@ */ package org.apache.tuscany.sca.itest.spring; +import helloworld.HelloWorld; + /** * A simple test Spring bean which provides the HelloWorld service * diff --git a/branches/sca-java-1.5.1/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/TestHelloWorldDelegatorBean.java b/branches/sca-java-1.5.1/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/TestHelloWorldDelegatorBean.java index b57cc7f366..5dfeeffd97 100644 --- a/branches/sca-java-1.5.1/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/TestHelloWorldDelegatorBean.java +++ b/branches/sca-java-1.5.1/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/TestHelloWorldDelegatorBean.java @@ -18,6 +18,8 @@ */ package org.apache.tuscany.sca.itest.spring; +import helloworld.HelloWorld; + /** * A simple test Spring bean which delgates to another bean * diff --git a/branches/sca-java-1.5.1/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/introspect/SpringXMLComponentTypeLoader.java b/branches/sca-java-1.5.1/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/introspect/SpringXMLComponentTypeLoader.java index 9e4aa9bc33..4df4e8c964 100644 --- a/branches/sca-java-1.5.1/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/introspect/SpringXMLComponentTypeLoader.java +++ b/branches/sca-java-1.5.1/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/introspect/SpringXMLComponentTypeLoader.java @@ -496,6 +496,9 @@ public class SpringXMLComponentTypeLoader { new SpringBeanIntrospector(assemblyFactory, javaFactory, policyFactory, beanElement.getCustructorArgs());
ComponentType beanComponentType = assemblyFactory.createComponentType();
javaImplementation = beanIntrospector.introspectBean(beanClass, beanComponentType);
+ // Set the service name as bean name
+ for (Service componentService : beanComponentType.getServices())
+ componentService.setName(beanElement.getId());
// Get the service interface defined by this Spring Bean and add to
// the component type of the Spring Assembly
List<Service> beanServices = beanComponentType.getServices();
|