diff options
Diffstat (limited to 'java/sca/itest/implementation-spring/src/main/resources/context')
9 files changed, 218 insertions, 3 deletions
diff --git a/java/sca/itest/implementation-spring/src/main/resources/context/access/CalculatorService-context.xml b/java/sca/itest/implementation-spring/src/main/resources/context/access/CalculatorService-context.xml new file mode 100644 index 0000000000..81d59432b8 --- /dev/null +++ b/java/sca/itest/implementation-spring/src/main/resources/context/access/CalculatorService-context.xml @@ -0,0 +1,45 @@ +<?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. +--> +<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.osoa.org/xmlns/sca/1.0/spring-sca.xsd"> + + <sca:service name="CalculatorService" + type="calculator.CalculatorService" target="CalculatorServiceBean"/> + + <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> + + <bean id="contextAccess" class="context.access.SCAApplicationContextProvider"> + </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>
\ No newline at end of file diff --git a/java/sca/itest/implementation-spring/src/main/resources/context/access/ContextAccess.composite b/java/sca/itest/implementation-spring/src/main/resources/context/access/ContextAccess.composite index 209f2cb065..abdaa98bff 100644 --- a/java/sca/itest/implementation-spring/src/main/resources/context/access/ContextAccess.composite +++ b/java/sca/itest/implementation-spring/src/main/resources/context/access/ContextAccess.composite @@ -24,7 +24,7 @@ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"> <component name="CalculatorServiceComponent"> - <implementation.spring location="META-INF/sca/context-access/CalculatorService-context.xml"/> + <implementation.spring location="CalculatorService-context.xml"/> <reference name="addService" target="AddServiceComponent" /> <reference name="subtractService" target="SubtractServiceComponent" /> <reference name="multiplyService" target="MultiplyServiceComponent" /> diff --git a/java/sca/itest/implementation-spring/src/main/resources/context/imports/ContextImports.composite b/java/sca/itest/implementation-spring/src/main/resources/context/imports/ContextImports.composite index 9829b79104..dd186bddfc 100644 --- a/java/sca/itest/implementation-spring/src/main/resources/context/imports/ContextImports.composite +++ b/java/sca/itest/implementation-spring/src/main/resources/context/imports/ContextImports.composite @@ -24,7 +24,7 @@ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"> <component name="CalculatorServiceComponent"> - <implementation.spring location="META-INF/sca/context-imports/SpringImport-context.xml"/> + <implementation.spring location="META-INF/spring/SpringImport-context.xml"/> <reference name="addService" target="AddServiceComponent" /> <reference name="subtractService" target="SubtractServiceComponent" /> <reference name="multiplyService" target="MultiplyServiceComponent" /> diff --git a/java/sca/itest/implementation-spring/src/main/resources/context/imports/META-INF/spring/CalculatorService-context.xml b/java/sca/itest/implementation-spring/src/main/resources/context/imports/META-INF/spring/CalculatorService-context.xml new file mode 100644 index 0000000000..c50f0ef4d9 --- /dev/null +++ b/java/sca/itest/implementation-spring/src/main/resources/context/imports/META-INF/spring/CalculatorService-context.xml @@ -0,0 +1,39 @@ +<?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. +--> +<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.osoa.org/xmlns/sca/1.0/spring-sca.xsd"> + + <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/java/sca/itest/implementation-spring/src/main/resources/context/imports/META-INF/spring/SpringImport-context.xml b/java/sca/itest/implementation-spring/src/main/resources/context/imports/META-INF/spring/SpringImport-context.xml new file mode 100644 index 0000000000..a0bb10e8dd --- /dev/null +++ b/java/sca/itest/implementation-spring/src/main/resources/context/imports/META-INF/spring/SpringImport-context.xml @@ -0,0 +1,29 @@ +<?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. +--> +<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.osoa.org/xmlns/sca/1.0/spring-sca.xsd"> + + <import resource="CalculatorService-context.xml"/> + +</beans>
\ No newline at end of file diff --git a/java/sca/itest/implementation-spring/src/main/resources/context/multiple/META-INF/spring/SpringHelloWorld-context.xml b/java/sca/itest/implementation-spring/src/main/resources/context/multiple/META-INF/spring/SpringHelloWorld-context.xml new file mode 100644 index 0000000000..62e4e077b6 --- /dev/null +++ b/java/sca/itest/implementation-spring/src/main/resources/context/multiple/META-INF/spring/SpringHelloWorld-context.xml @@ -0,0 +1,31 @@ +<?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.osoa.org/xmlns/sca/1.0/spring-sca.xsd"> + + <bean id="testBean" class="org.apache.tuscany.sca.itest.spring.TestHelloWorldBean" lazy-init="true"> + </bean> + +</beans>
\ No newline at end of file diff --git a/java/sca/itest/implementation-spring/src/main/resources/context/multiple/META-INF/spring/StockQuoteService-context.xml b/java/sca/itest/implementation-spring/src/main/resources/context/multiple/META-INF/spring/StockQuoteService-context.xml new file mode 100644 index 0000000000..5b1885d6b3 --- /dev/null +++ b/java/sca/itest/implementation-spring/src/main/resources/context/multiple/META-INF/spring/StockQuoteService-context.xml @@ -0,0 +1,36 @@ +<?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. +--> +<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.osoa.org/xmlns/sca/1.0/spring-sca.xsd"> + + <sca:service name="StockQuoteService" + type="bigbank.stockquote.StockQuoteService" target="StockQuoteServiceBean"/> + + <bean id="StockQuoteServiceBean" class="bigbank.stockquote.StockQuoteImpl"> + </bean> + + <bean id="applicationContextProvider" class="context.access.SCAApplicationContextProvider"> + </bean> + +</beans>
\ No newline at end of file diff --git a/java/sca/itest/implementation-spring/src/main/resources/context/multiple/META-INF/spring/beanRefContext.xml b/java/sca/itest/implementation-spring/src/main/resources/context/multiple/META-INF/spring/beanRefContext.xml new file mode 100644 index 0000000000..1bb3b2c146 --- /dev/null +++ b/java/sca/itest/implementation-spring/src/main/resources/context/multiple/META-INF/spring/beanRefContext.xml @@ -0,0 +1,35 @@ +<?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. +--> +<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.osoa.org/xmlns/sca/1.0/spring-sca.xsd"> + + <bean id="beanRefFactory" class="org.springframework.context.support.ClassPathXmlApplicationContext"> + <constructor-arg> + <list> + <value>META-INF/spring/StockQuoteService-context.xml</value> + <value>META-INF/spring/SpringHelloWorld-context.xml</value> + </list> + </constructor-arg> + </bean> +</beans>
\ No newline at end of file diff --git a/java/sca/itest/implementation-spring/src/main/resources/context/multiple/MultipleContext.composite b/java/sca/itest/implementation-spring/src/main/resources/context/multiple/MultipleContext.composite index 1a66ff20f1..5acdc77d1a 100644 --- a/java/sca/itest/implementation-spring/src/main/resources/context/multiple/MultipleContext.composite +++ b/java/sca/itest/implementation-spring/src/main/resources/context/multiple/MultipleContext.composite @@ -29,7 +29,7 @@ </service> <component name="StockQuoteServiceComponent"> - <implementation.spring location="META-INF/sca/context-multiple/beanRefContext.xml"/> + <implementation.spring location="META-INF/spring/beanRefContext.xml"/> </component> </composite> |