diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2010-10-06 13:54:26 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2010-10-06 13:54:26 +0000 |
commit | 26c7d87982e6eb53ff3f5b394b06af135395824b (patch) | |
tree | c7d5d5ca95633ca693838e4569453e9e26f7982c /sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources | |
parent | 3c39df7ce9d8d2db2abcf67b2c5797a2bad5bb30 (diff) |
Copy itest and compliance test to be under testing folder
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1005039 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources')
34 files changed, 1150 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/context/access/CalculatorService-context.xml b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/context/access/CalculatorService-context.xml new file mode 100644 index 0000000000..81d59432b8 --- /dev/null +++ b/sca-java-2.x/trunk/testing/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/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/context/access/ContextAccess.composite b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/context/access/ContextAccess.composite new file mode 100644 index 0000000000..f5514bad0a --- /dev/null +++ b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/context/access/ContextAccess.composite @@ -0,0 +1,49 @@ +<?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://docs.oasis-open.org/ns/opencsa/sca/200912" + targetNamespace="http://contextaccess" + xmlns:sample="http://contextaccess" + name="ContextAccess" + xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"> + + <component name="CalculatorServiceComponent"> + <implementation.spring location="CalculatorService-context.xml"/> + <reference name="addService" target="AddServiceComponent" /> + <reference name="subtractService" target="SubtractServiceComponent" /> + <reference name="multiplyService" target="MultiplyServiceComponent" /> + <reference name="divideService" target="DivideServiceComponent" /> + </component> + + <component name="AddServiceComponent"> + <implementation.java class="calculator.AddServiceImpl"/> + </component> + + <component name="SubtractServiceComponent"> + <implementation.java class="calculator.SubtractServiceImpl"/> + </component> + + <component name="MultiplyServiceComponent"> + <implementation.java class="calculator.MultiplyServiceImpl"/> + </component> + + <component name="DivideServiceComponent"> + <implementation.java class="calculator.DivideServiceImpl"/> + </component> +</composite> diff --git a/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/context/imports/ContextImports.composite b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/context/imports/ContextImports.composite new file mode 100644 index 0000000000..27df510da8 --- /dev/null +++ b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/context/imports/ContextImports.composite @@ -0,0 +1,49 @@ +<?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://docs.oasis-open.org/ns/opencsa/sca/200912" + targetNamespace="http://contextimports" + xmlns:sample="http://contextimports" + name="ContextImports" + xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"> + + <component name="CalculatorServiceComponent"> + <implementation.spring location="META-INF/spring/SpringImport-context.xml"/> + <reference name="addService" target="AddServiceComponent" /> + <reference name="subtractService" target="SubtractServiceComponent" /> + <reference name="multiplyService" target="MultiplyServiceComponent" /> + <reference name="divideService" target="DivideServiceComponent" /> + </component> + + <component name="AddServiceComponent"> + <implementation.java class="calculator.AddServiceImpl"/> + </component> + + <component name="SubtractServiceComponent"> + <implementation.java class="calculator.SubtractServiceImpl"/> + </component> + + <component name="MultiplyServiceComponent"> + <implementation.java class="calculator.MultiplyServiceImpl"/> + </component> + + <component name="DivideServiceComponent"> + <implementation.java class="calculator.DivideServiceImpl"/> + </component> +</composite> diff --git a/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/context/imports/META-INF/spring/CalculatorService-context.xml b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/context/imports/META-INF/spring/CalculatorService-context.xml new file mode 100644 index 0000000000..c50f0ef4d9 --- /dev/null +++ b/sca-java-2.x/trunk/testing/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/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/context/imports/META-INF/spring/SpringImport-context.xml b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/context/imports/META-INF/spring/SpringImport-context.xml new file mode 100644 index 0000000000..a0bb10e8dd --- /dev/null +++ b/sca-java-2.x/trunk/testing/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/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/context/multiple/MultipleContext.composite b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/context/multiple/MultipleContext.composite new file mode 100644 index 0000000000..5973484f6e --- /dev/null +++ b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/context/multiple/MultipleContext.composite @@ -0,0 +1,30 @@ +<?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://docs.oasis-open.org/ns/opencsa/sca/200912" + xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912" + targetNamespace="http://stockquote" + xmlns:hw="http://stockquote" + name="MultipleContext"> + + <component name="StockQuoteServiceComponent"> + <implementation.spring location="springapp"/> + </component> + +</composite> diff --git a/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/MANIFEST.MF b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..9267f28e83 --- /dev/null +++ b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0
+Spring-Context: META-INF/spring/beanRefContext.xml; META-INF/spring/StockQuoteService-context.xml
+
diff --git a/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/SpringHelloWorld-context.xml b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/SpringHelloWorld-context.xml new file mode 100644 index 0000000000..62e4e077b6 --- /dev/null +++ b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/context/multiple/springapp/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/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/StockQuoteService-context.xml b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/StockQuoteService-context.xml new file mode 100644 index 0000000000..5b1885d6b3 --- /dev/null +++ b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/context/multiple/springapp/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/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/beanRefContext.xml b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/beanRefContext.xml new file mode 100644 index 0000000000..dcc88f6770 --- /dev/null +++ b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/beanRefContext.xml @@ -0,0 +1,34 @@ +<?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>context/multiple/springapp/META-INF/spring/SpringHelloWorld-context.xml</value> + </list> + </constructor-arg> + </bean> +</beans>
\ No newline at end of file diff --git a/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/implementation/policies/CalculatorJass.config b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/implementation/policies/CalculatorJass.config new file mode 100644 index 0000000000..0e7cb86633 --- /dev/null +++ b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/implementation/policies/CalculatorJass.config @@ -0,0 +1,3 @@ +Calculator {
+ calculator.security.JaasLoginModule required debug=true;
+};
diff --git a/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/implementation/policies/CalculatorLogMessages.properties b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/implementation/policies/CalculatorLogMessages.properties new file mode 100644 index 0000000000..0238f0b013 --- /dev/null +++ b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/implementation/policies/CalculatorLogMessages.properties @@ -0,0 +1,18 @@ +# 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. +CALLING_OPERATION=Inovoking operation {0} with arguments {1} +OPERATION_RETURNED=Returning from operation {0} with return value {1}
\ No newline at end of file diff --git a/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/implementation/policies/ImplementationPolicies.composite b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/implementation/policies/ImplementationPolicies.composite new file mode 100644 index 0000000000..5ffeda11df --- /dev/null +++ b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/implementation/policies/ImplementationPolicies.composite @@ -0,0 +1,58 @@ +<?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://docs.oasis-open.org/ns/opencsa/sca/200912" + targetNamespace="http://sample" + xmlns:sample="http://sample" + xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1" + name="Calculator"> + + <component name="CalculatorServiceComponent"> + <implementation.spring location="META-INF/spring/CalculatorService-context.xml"/> + <reference name="addService" target="AddServiceComponent" /> + <reference name="subtractService" target="SubtractServiceComponent" /> + <reference name="multiplyService" target="MultiplyServiceComponent" policySets="tuscany:JaasPolicy"/> + <reference name="divideService" target="DivideServiceComponent" /> + </component> + + <component name="AddServiceComponent"> + <implementation.java class="calculator.AddServiceImpl"/> + </component> + + <component name="SubtractServiceComponent"> + <implementation.java class="calculator.SubtractServiceImpl"/> + </component> + + <component name="MultiplyServiceComponent" policySets="tuscany:JaasPolicy"> + <implementation.java class="calculator.MultiplyServiceImpl" /> + </component> + + <component name="DivideServiceComponent"> + <implementation.java class="calculator.DivideServiceImpl"/> + </component> + + <component name="AnotherCalculatorServiceComponent"> + <implementation.spring location="META-INF/spring/CalculatorService-context.xml" requires="tuscany:logging"/> + <reference name="addService" target="AddServiceComponent" /> + <reference name="subtractService" target="SubtractServiceComponent" /> + <reference name="multiplyService" target="MultiplyServiceComponent" policySets="tuscany:JaasPolicy"/> + <reference name="divideService" target="DivideServiceComponent" /> + </component> + +</composite> diff --git a/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/implementation/policies/META-INF/definitions.xml b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/implementation/policies/META-INF/definitions.xml new file mode 100644 index 0000000000..efc2464425 --- /dev/null +++ b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/implementation/policies/META-INF/definitions.xml @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="ASCII"?> +<!-- + * 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. +--> +<definitions xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912" + targetNamespace="http://tuscany.apache.org/xmlns/sca/1.1" + xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912" + xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1" + xmlns:calc="http://calculator"> + + <intent name="logging" constrains="sca:implementation" intentType="implementation"/> + + <!-- PolicySets --> + <policySet name="JaasPolicy" provides="tuscany:jaasAuthentication" appliesTo="//sca:binding"> +<!-- empty policy set so that intents are resolved and match works but without including + any actual policy runtime artifacts + <tuscany:jaasAuthentication> + <tuscany:configurationName>Calculator</tuscany:configurationName> + <tuscany:callbackHandler>calculator.security.CalculatorCallbackHandler</tuscany:callbackHandler> + </tuscany:jaasAuthentication> +--> + </policySet> + + + <!-- PolicySets --> + + <policySet name="JDKLoggingPolicy" + provides="tuscany:logging" + appliesTo="//sca:implementation.spring" + attachTo="//sca:implementation.spring"> +<!-- empty policy set so that intents are resolved and match works but without including + any actual policy runtime artifacts + <tuscany:jdkLogger name="calculator"> + <logLevel>FINER</logLevel> + </tuscany:jdkLogger> +--> + </policySet> + +</definitions>
\ No newline at end of file diff --git a/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/implementation/policies/META-INF/spring/CalculatorService-context.xml b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/implementation/policies/META-INF/spring/CalculatorService-context.xml new file mode 100644 index 0000000000..c50f0ef4d9 --- /dev/null +++ b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/implementation/policies/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/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/location/folder/SpringFolderLocation.composite b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/location/folder/SpringFolderLocation.composite new file mode 100644 index 0000000000..e889d84544 --- /dev/null +++ b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/location/folder/SpringFolderLocation.composite @@ -0,0 +1,40 @@ +<?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 for the SpringSCAPropertyTestCase + * This composite has the HelloWorldComponent implemented with a Spring implementation where + * the Spring application context uses an explicit SCA property. The value of the property + * is set in this composite and is used to compute the response to a service invocation from + * the ClientComponent. + --> +<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912" + targetNamespace="http://SpringFolderLocation" + name="SpringFolderLocation"> + + <component name="ClientComponent"> + <implementation.java class="helloworld.HelloWorldProxy"/> + <reference name="delegate" target="HelloWorldComponent"/> + </component> + + <component name="HelloWorldComponent"> + <implementation.spring location="springapp"/> + <property name="TestProperty">Hello</property> + </component> + +</composite> diff --git a/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/location/folder/springapp/META-INF/MANIFEST.MF b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/location/folder/springapp/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..950dbeba4c --- /dev/null +++ b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/location/folder/springapp/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0
+Spring-Context: META-INF/spring/SpringSCAProperty-context.xml
+
diff --git a/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/location/folder/springapp/META-INF/spring/SpringSCAProperty-context.xml b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/location/folder/springapp/META-INF/spring/SpringSCAProperty-context.xml new file mode 100644 index 0000000000..8613e6c82a --- /dev/null +++ b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/location/folder/springapp/META-INF/spring/SpringSCAProperty-context.xml @@ -0,0 +1,34 @@ +<?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="mock.TestSCAPropertyBean" lazy-init="true"> + <property name="hello" ref="TestProperty"/> + </bean> + + <sca:property id="foo" name="TestProperty" type="java.lang.String"/> + +</beans>
\ No newline at end of file diff --git a/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/location/jar/SpringJarLocation.composite b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/location/jar/SpringJarLocation.composite new file mode 100644 index 0000000000..b7281272da --- /dev/null +++ b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/location/jar/SpringJarLocation.composite @@ -0,0 +1,40 @@ +<?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 for the SpringSCAPropertyTestCase + * This composite has the HelloWorldComponent implemented with a Spring implementation where + * the Spring application context uses an explicit SCA property. The value of the property + * is set in this composite and is used to compute the response to a service invocation from + * the ClientComponent. + --> +<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912" + targetNamespace="http://SpringJarLocation" + name="SpringJarLocation"> + + <component name="ClientComponent"> + <implementation.java class="helloworld.HelloWorldProxy"/> + <reference name="delegate" target="HelloWorldComponent"/> + </component> + + <component name="HelloWorldComponent"> + <implementation.spring location="spring-context.jar"/> + <property name="TestProperty">Hello</property> + </component> + +</composite> diff --git a/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/location/jar/spring-context.jar b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/location/jar/spring-context.jar Binary files differnew file mode 100644 index 0000000000..504d59e5ff --- /dev/null +++ b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/location/jar/spring-context.jar diff --git a/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/META-INF/spring/SpringDelegationHelloWorld-context.xml b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/META-INF/spring/SpringDelegationHelloWorld-context.xml new file mode 100644 index 0000000000..9912624870 --- /dev/null +++ b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/META-INF/spring/SpringDelegationHelloWorld-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. +--> +<!-- 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"> + + <sca:service name="HelloWorld" type="helloworld.HelloWorld" target="testBean"/> + + <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 diff --git a/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/META-INF/spring/SpringHelloWorld-context.xml b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/META-INF/spring/SpringHelloWorld-context.xml new file mode 100644 index 0000000000..62e4e077b6 --- /dev/null +++ b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/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/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorld.composite b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorld.composite new file mode 100644 index 0000000000..e9f8bb888b --- /dev/null +++ b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorld.composite @@ -0,0 +1,33 @@ +<?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://docs.oasis-open.org/ns/opencsa/sca/200912" + targetNamespace="http://SpringDelegationHelloWorld" + name="SpringDelegationHelloWorld"> + + <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/spring/SpringDelegationHelloWorld-context.xml"/> + </component> + +</composite> diff --git a/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringHelloWorld.composite b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringHelloWorld.composite new file mode 100644 index 0000000000..30719684a9 --- /dev/null +++ b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringHelloWorld.composite @@ -0,0 +1,33 @@ +<?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://docs.oasis-open.org/ns/opencsa/sca/200912" + targetNamespace="SpringHelloWorld" + 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/spring/SpringHelloWorld-context.xml"/> + </component> + +</composite> diff --git a/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/sca/references/META-INF/spring/SpringExplicitReference-context.xml b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/sca/references/META-INF/spring/SpringExplicitReference-context.xml new file mode 100644 index 0000000000..1705164104 --- /dev/null +++ b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/sca/references/META-INF/spring/SpringExplicitReference-context.xml @@ -0,0 +1,33 @@ +<?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="testBean" class="mock.TestReferenceBean"> + <property name="bean" ref="testReference"/> + </bean> + + <sca:reference name="testReference" type="helloworld.HelloWorld"/> + +</beans> diff --git a/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/sca/references/META-INF/spring/SpringImplicitReference-context.xml b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/sca/references/META-INF/spring/SpringImplicitReference-context.xml new file mode 100644 index 0000000000..539dfa6e32 --- /dev/null +++ b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/sca/references/META-INF/spring/SpringImplicitReference-context.xml @@ -0,0 +1,34 @@ +<?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="testBean" class="mock.TestReferenceBean"> + <!-- Here is the implicit reference - a property with a ref not satisifed within the + * Spring application context. + --> + <property name="bean" ref="testReference"/> + </bean> + +</beans> diff --git a/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/sca/references/SpringExplicitReference.composite b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/sca/references/SpringExplicitReference.composite new file mode 100644 index 0000000000..fcbafad27d --- /dev/null +++ b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/sca/references/SpringExplicitReference.composite @@ -0,0 +1,33 @@ +<?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://docs.oasis-open.org/ns/opencsa/sca/200912" + targetNamespace="http://SpringExplicitReference" + name="SpringExplicitReference"> + + <component name="ClientComponent"> + <implementation.spring location="META-INF/spring/SpringExplicitReference-context.xml"/> + <reference name="testReference" target="ExplicitReferenceComponent"/> + </component> + + <component name="ExplicitReferenceComponent"> + <implementation.java class="helloworld.HelloWorldImpl"/> + </component> + +</composite> diff --git a/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/sca/references/SpringImplicitReference.composite b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/sca/references/SpringImplicitReference.composite new file mode 100644 index 0000000000..4204b75b48 --- /dev/null +++ b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/sca/references/SpringImplicitReference.composite @@ -0,0 +1,40 @@ +<?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 for the SpringImplicitReferenceTestCase + * This composite has a ClientComponent implemented with a Spring implementation where + * Spring application context uses an implicit reference definition through a Bean with + * a property with an unsatisfied ref attribute, which forms the reference. + * The reference is satisified by a wire to a ReferenceComponent which is implemented + * by a plain Java POJO. +--> +<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912" + targetNamespace="http://SpringImplicitReference" + name="SpringImplicitReference"> + + <component name="ClientComponent"> + <implementation.spring location="META-INF/spring/SpringImplicitReference-context.xml"/> + <reference name="testReference" target="ImplicitReferenceComponent"/> + </component> + + <component name="ImplicitReferenceComponent"> + <implementation.java class="helloworld.HelloWorldImpl"/> + </component> + +</composite> diff --git a/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/sca/services/META-INF/spring/SpringExplicitService-context.xml b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/sca/services/META-INF/spring/SpringExplicitService-context.xml new file mode 100644 index 0000000000..5fe57ed733 --- /dev/null +++ b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/sca/services/META-INF/spring/SpringExplicitService-context.xml @@ -0,0 +1,41 @@ +<?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 SpringExplicitHelloWorld testcase +In this case, the service offered by the Spring application is specified +explicitly using an sca:service element --> +<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" + xmlns:spec="http://docs.oasis-open.org/ns/opencsa/sca/200912" + 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="fooService" + type="helloworld.HelloWorld" + target="testBean"/> + <!-- requires="spec:serverAuthentication" --> + + <bean id="testBean" + class="mock.TestHelloWorldBean" + lazy-init="true"> + </bean> + +</beans>
\ No newline at end of file diff --git a/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/sca/services/META-INF/spring/SpringImplicitService-context.xml b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/sca/services/META-INF/spring/SpringImplicitService-context.xml new file mode 100644 index 0000000000..83558e8abc --- /dev/null +++ b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/sca/services/META-INF/spring/SpringImplicitService-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="mock.TestHelloWorldBean" lazy-init="true"> + </bean> + +</beans>
\ No newline at end of file diff --git a/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/sca/services/SpringExplicitService.composite b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/sca/services/SpringExplicitService.composite new file mode 100644 index 0000000000..c9bb5b9e3e --- /dev/null +++ b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/sca/services/SpringExplicitService.composite @@ -0,0 +1,34 @@ +<?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://docs.oasis-open.org/ns/opencsa/sca/200912" + xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1" + targetNamespace="http://SpringExplicitService" + name="SpringExplicitService"> + + <component name="ClientComponent"> + <implementation.java class="helloworld.HelloWorldProxy"/> + <reference name="delegate" target="ExplicitServiceComponent"/> + </component> + + <component name="ExplicitServiceComponent"> + <implementation.spring location="META-INF/spring/SpringExplicitService-context.xml"/> + </component> + +</composite> diff --git a/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/sca/services/SpringImplicitService.composite b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/sca/services/SpringImplicitService.composite new file mode 100644 index 0000000000..856b41f897 --- /dev/null +++ b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/sca/services/SpringImplicitService.composite @@ -0,0 +1,33 @@ +<?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://docs.oasis-open.org/ns/opencsa/sca/200912" + targetNamespace="http://SpringImplicitService" + name="SpringImplicitService"> + + <component name="ClientComponent"> + <implementation.java class="helloworld.HelloWorldProxy"/> + <reference name="delegate" target="ImplicitServiceComponent"/> + </component> + + <component name="ImplicitServiceComponent"> + <implementation.spring location="META-INF/spring/SpringImplicitService-context.xml"/> + </component> + +</composite> diff --git a/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/spring/annotations/Calculator.composite b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/spring/annotations/Calculator.composite new file mode 100644 index 0000000000..b59114bd31 --- /dev/null +++ b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/spring/annotations/Calculator.composite @@ -0,0 +1,60 @@ +<?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 targetNamespace="http://sample" + xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912" + xmlns:sample="http://sample" + name="Calculator" + xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"> + + <component name="CalculatorServiceComponent"> + <implementation.spring location="CalculatorService-context.xml"/> + <property name="message">HelloWorld</property> + <reference name="addService" target="AddServiceComponent" /> + <reference name="subtractService" target="SubtractServiceComponent" /> + <reference name="multiplyService" target="MultiplyServiceComponent" /> + <reference name="divideService" target="DivideServiceComponent" /> + </component> + + <component name="AddServiceComponent"> + <implementation.java class="calculator.AddServiceImpl"/> + </component> + + <component name="SubtractServiceComponent"> + <implementation.java class="calculator.SubtractServiceImpl"/> + </component> + + <component name="MultiplyServiceComponent"> + <implementation.java class="calculator.MultiplyServiceImpl"/> + </component> + + <component name="DivideServiceComponent"> + <implementation.java class="calculator.DivideServiceImpl"/> + </component> + + <!--<component name="AnotherCalculatorServiceComponent"> + <implementation.spring location="CalculatorService-context.xml"/> + <property name="message">HelloWorld</property> + <reference name="addService" target="AddServiceComponent" /> + <reference name="subtractService" target="SubtractServiceComponent" /> + <reference name="multiplyService" target="MultiplyServiceComponent" /> + <reference name="divideService" target="DivideServiceComponent" /> + </component> + +--></composite> diff --git a/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/spring/annotations/CalculatorService-context.xml b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/spring/annotations/CalculatorService-context.xml new file mode 100644 index 0000000000..4a873f2424 --- /dev/null +++ b/sca-java-2.x/trunk/testing/itest/implementation-spring/src/main/resources/spring/annotations/CalculatorService-context.xml @@ -0,0 +1,41 @@ +<?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="spring.annotations.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"/> + + <sca:property id="msg" name="message" type="java.lang.String"/> + +</beans> |