You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by kw...@apache.org on 2008/02/17 21:51:17 UTC
svn commit: r628548 - in /incubator/tuscany/java/sca/itest/spring/src:
main/resources/META-INF/sca/
main/resources/org/apache/tuscany/sca/itest/spring/
test/java/org/apache/tuscany/sca/itest/spring/
Author: kwilliams
Date: Sun Feb 17 12:51:15 2008
New Revision: 628548
URL: http://svn.apache.org/viewvc?rev=628548&view=rev
Log:
adding simple multi-bean Spring test case
Added:
incubator/tuscany/java/sca/itest/spring/src/main/resources/META-INF/sca/SpringDelegationHelloWorld-context.xml (with props)
incubator/tuscany/java/sca/itest/spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorld.composite (with props)
incubator/tuscany/java/sca/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorldTestCase.java (with props)
incubator/tuscany/java/sca/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/TestHelloWorldDelegatorBean.java (with props)
Modified:
incubator/tuscany/java/sca/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringHelloWorldTestCase.java
Added: incubator/tuscany/java/sca/itest/spring/src/main/resources/META-INF/sca/SpringDelegationHelloWorld-context.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/spring/src/main/resources/META-INF/sca/SpringDelegationHelloWorld-context.xml?rev=628548&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/spring/src/main/resources/META-INF/sca/SpringDelegationHelloWorld-context.xml (added)
+++ incubator/tuscany/java/sca/itest/spring/src/main/resources/META-INF/sca/SpringDelegationHelloWorld-context.xml Sun Feb 17 12:51:15 2008
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * 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.
+-->
+<!-- Application context for the SpringHelloWorld testcase -->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:sca="http://www.springframework.org/schema/sca"
+ xsi:schemaLocation="
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+http://www.springframework.org/schema/sca http://www.springframework.org/schema/sca/spring-sca.xsd">
+
+ <bean id="delegateBean"
+ class="org.apache.tuscany.sca.itest.spring.TestHelloWorldBean" lazy-init="true">
+ </bean>
+
+ <bean id="testBean"
+ class="org.apache.tuscany.sca.itest.spring.TestHelloWorldDelegatorBean" lazy-init="true">
+ <property name="delegate"><ref bean="delegateBean"/></property>
+ </bean>
+
+</beans>
\ No newline at end of file
Propchange: incubator/tuscany/java/sca/itest/spring/src/main/resources/META-INF/sca/SpringDelegationHelloWorld-context.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/itest/spring/src/main/resources/META-INF/sca/SpringDelegationHelloWorld-context.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: incubator/tuscany/java/sca/itest/spring/src/main/resources/META-INF/sca/SpringDelegationHelloWorld-context.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: incubator/tuscany/java/sca/itest/spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorld.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorld.composite?rev=628548&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorld.composite (added)
+++ incubator/tuscany/java/sca/itest/spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorld.composite Sun Feb 17 12:51:15 2008
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * 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.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ name="SpringHelloWorld">
+
+ <component name="ClientComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.spring.HelloWorldProxy"/>
+ <reference name="delegate" target="HelloWorldComponent"/>
+ </component>
+
+ <component name="HelloWorldComponent">
+ <implementation.spring location="META-INF/sca/SpringDelegationHelloWorld-context.xml"/>
+ </component>
+
+</composite>
Propchange: incubator/tuscany/java/sca/itest/spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorld.composite
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/itest/spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorld.composite
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: incubator/tuscany/java/sca/itest/spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorld.composite
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: incubator/tuscany/java/sca/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorldTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorldTestCase.java?rev=628548&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorldTestCase.java (added)
+++ incubator/tuscany/java/sca/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorldTestCase.java Sun Feb 17 12:51:15 2008
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * 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.
+ */
+
+package org.apache.tuscany.sca.itest.spring;
+
+/**
+ * A basic test case of:
+ * 1) A composite containing a component with a Spring implementation
+ * 2) The composite has a component with a Java POJO implementation which uses the
+ * Spring implementation to satisfy a reference
+ *
+ */
+public class SpringDelegationHelloWorldTestCase extends AbstractHelloWorldTestCase {
+ // super class does it all getting composite based on this class name
+}
Propchange: incubator/tuscany/java/sca/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorldTestCase.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorldTestCase.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified: incubator/tuscany/java/sca/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringHelloWorldTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringHelloWorldTestCase.java?rev=628548&r1=628547&r2=628548&view=diff
==============================================================================
--- incubator/tuscany/java/sca/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringHelloWorldTestCase.java (original)
+++ incubator/tuscany/java/sca/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringHelloWorldTestCase.java Sun Feb 17 12:51:15 2008
@@ -24,6 +24,7 @@
* 1) A composite containing a component with a Spring implementation
* 2) The composite has a component with a Java POJO implementation which uses the
* Spring implementation to satisfy a reference
+ * 3) The Spring component delgates function to a second spring bean
*
*/
public class SpringHelloWorldTestCase extends AbstractHelloWorldTestCase {
Added: incubator/tuscany/java/sca/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/TestHelloWorldDelegatorBean.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/TestHelloWorldDelegatorBean.java?rev=628548&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/TestHelloWorldDelegatorBean.java (added)
+++ incubator/tuscany/java/sca/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/TestHelloWorldDelegatorBean.java Sun Feb 17 12:51:15 2008
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * 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.
+ */
+package org.apache.tuscany.sca.itest.spring;
+
+/**
+ * A simple test Spring bean which delgates to another bean
+ *
+ */
+
+public class TestHelloWorldDelegatorBean implements HelloWorld {
+
+ HelloWorld delegate;
+
+ public void setDelegate(HelloWorld delegate) {
+ this.delegate = delegate;
+ }
+
+ // Classic "Hello xxx" response to any input message
+ public String sayHello(String message) {
+ System.out.println("TestHelloWorldDelegatorBean - sayHello called");
+ return delegate.sayHello(message);
+ }
+
+}
Propchange: incubator/tuscany/java/sca/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/TestHelloWorldDelegatorBean.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/TestHelloWorldDelegatorBean.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org