summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--java/sca/itest/spring/src/main/resources/META-INF/sca/SpringDelegationHelloWorld-context.xml2
-rw-r--r--java/sca/itest/spring/src/main/resources/META-INF/sca/SpringHelloWorld-context.xml2
-rw-r--r--java/sca/itest/validation/src/main/resources/META-INF/sca/SpringHelloWorld-context.xml2
-rw-r--r--java/sca/modules/implementation-spring/src/main/resources/META-INF/spring.handlers4
-rw-r--r--java/sca/modules/implementation-spring/src/main/resources/META-INF/spring.schemas2
-rw-r--r--java/sca/modules/implementation-spring/src/test/resources/META-INF/sca/SpringExplicitHelloWorld-context.xml2
-rw-r--r--java/sca/modules/implementation-spring/src/test/resources/META-INF/sca/SpringExplicitReference-context.xml2
-rw-r--r--java/sca/modules/implementation-spring/src/test/resources/META-INF/sca/SpringHelloWorld-context.xml2
-rw-r--r--java/sca/modules/implementation-spring/src/test/resources/META-INF/sca/SpringImplicitReference-context.xml2
-rw-r--r--java/sca/modules/implementation-spring/src/test/resources/META-INF/sca/testReferenceContext.xml2
-rw-r--r--java/sca/modules/implementation-spring/src/test/resources/META-INF/sca/testServiceContext.xml2
-rw-r--r--java/sca/modules/implementation-spring/src/test/resources/spring/META-INF/spring/SpringSCAProperty-context.xml66
-rw-r--r--java/sca/modules/implementation-spring/src/test/resources/test.xml2
-rw-r--r--java/sca/samples/simple-bigbank-spring/src/main/resources/spring-context/Account-spring-context.xml106
-rw-r--r--java/sca/samples/simple-bigbank-spring/src/main/resources/spring-context/SavingsAccount-context.xml66
-rw-r--r--java/sca/samples/simple-bigbank-spring/src/main/resources/spring-context/StockAccount/META-INF/spring/StockAccount-context.xml64
-rw-r--r--java/sca/samples/spring-bigbank-calculator/src/main/resources/META-INF/spring/CalculatorService-context.xml90
-rw-r--r--java/sca/samples/spring-bigbank-checkaccount/src/main/resources/spring-context/META-INF/spring/CheckingAccountService-context.xml2
-rw-r--r--java/sca/samples/spring-bigbank-stockquote/pom.xml19
-rw-r--r--java/sca/samples/spring-bigbank-stockquote/src/main/java/bigbank/stockquote/server/SCAApplicationContextProvider.java19
-rw-r--r--java/sca/samples/spring-bigbank-stockquote/src/main/java/bigbank/stockquote/server/StockQuoteServer.java9
-rw-r--r--java/sca/samples/spring-bigbank-stockquote/src/main/resources/META-INF/spring/StockQuoteService-context.xml69
22 files changed, 290 insertions, 246 deletions
diff --git a/java/sca/itest/spring/src/main/resources/META-INF/sca/SpringDelegationHelloWorld-context.xml b/java/sca/itest/spring/src/main/resources/META-INF/sca/SpringDelegationHelloWorld-context.xml
index 7068224183..18ab7e332d 100644
--- a/java/sca/itest/spring/src/main/resources/META-INF/sca/SpringDelegationHelloWorld-context.xml
+++ b/java/sca/itest/spring/src/main/resources/META-INF/sca/SpringDelegationHelloWorld-context.xml
@@ -23,7 +23,7 @@
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">
+http://www.springframework.org/schema/sca http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd">
<bean id="delegateBean"
class="org.apache.tuscany.sca.itest.spring.TestHelloWorldBean" lazy-init="true">
diff --git a/java/sca/itest/spring/src/main/resources/META-INF/sca/SpringHelloWorld-context.xml b/java/sca/itest/spring/src/main/resources/META-INF/sca/SpringHelloWorld-context.xml
index 3b87979ab2..62e4e077b6 100644
--- a/java/sca/itest/spring/src/main/resources/META-INF/sca/SpringHelloWorld-context.xml
+++ b/java/sca/itest/spring/src/main/resources/META-INF/sca/SpringHelloWorld-context.xml
@@ -23,7 +23,7 @@
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">
+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>
diff --git a/java/sca/itest/validation/src/main/resources/META-INF/sca/SpringHelloWorld-context.xml b/java/sca/itest/validation/src/main/resources/META-INF/sca/SpringHelloWorld-context.xml
index a37a01004e..609ffed02d 100644
--- a/java/sca/itest/validation/src/main/resources/META-INF/sca/SpringHelloWorld-context.xml
+++ b/java/sca/itest/validation/src/main/resources/META-INF/sca/SpringHelloWorld-context.xml
@@ -23,7 +23,7 @@
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">
+http://www.springframework.org/schema/sca http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd">
<bean id="testBean" class="impl.spring.TestHelloWorldBean" lazy-init="true">
</bean>
diff --git a/java/sca/modules/implementation-spring/src/main/resources/META-INF/spring.handlers b/java/sca/modules/implementation-spring/src/main/resources/META-INF/spring.handlers
index 4e7df50291..7f9a7b17b0 100644
--- a/java/sca/modules/implementation-spring/src/main/resources/META-INF/spring.handlers
+++ b/java/sca/modules/implementation-spring/src/main/resources/META-INF/spring.handlers
@@ -1,3 +1 @@
-http\://www.springframework.org/schema/sca=org.springframework.sca.config.ScaNamespaceHandler
-
-
+http\://www.springframework.org/schema/sca=org.apache.tuscany.sca.implementation.spring.ScaNamespaceHandler
diff --git a/java/sca/modules/implementation-spring/src/main/resources/META-INF/spring.schemas b/java/sca/modules/implementation-spring/src/main/resources/META-INF/spring.schemas
index 4374e4f1b0..249cc21c13 100644
--- a/java/sca/modules/implementation-spring/src/main/resources/META-INF/spring.schemas
+++ b/java/sca/modules/implementation-spring/src/main/resources/META-INF/spring.schemas
@@ -1 +1 @@
-http\://www.springframework.org/schema/sca/spring-sca.xsd=org/springframework/sca/xml/spring-sca.xsd
+http\://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd=org/springframework/sca/xml/spring-sca.xsd
diff --git a/java/sca/modules/implementation-spring/src/test/resources/META-INF/sca/SpringExplicitHelloWorld-context.xml b/java/sca/modules/implementation-spring/src/test/resources/META-INF/sca/SpringExplicitHelloWorld-context.xml
index 0733f49de8..7c358ac01c 100644
--- a/java/sca/modules/implementation-spring/src/test/resources/META-INF/sca/SpringExplicitHelloWorld-context.xml
+++ b/java/sca/modules/implementation-spring/src/test/resources/META-INF/sca/SpringExplicitHelloWorld-context.xml
@@ -25,7 +25,7 @@ explicitly using an sca:service element -->
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">
+http://www.springframework.org/schema/sca http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd">
<sca:service name="fooService"
type="org.apache.tuscany.sca.implementation.spring.itests.helloworld.HelloWorld"
diff --git a/java/sca/modules/implementation-spring/src/test/resources/META-INF/sca/SpringExplicitReference-context.xml b/java/sca/modules/implementation-spring/src/test/resources/META-INF/sca/SpringExplicitReference-context.xml
index c7feddf87f..38e90b41fa 100644
--- a/java/sca/modules/implementation-spring/src/test/resources/META-INF/sca/SpringExplicitReference-context.xml
+++ b/java/sca/modules/implementation-spring/src/test/resources/META-INF/sca/SpringExplicitReference-context.xml
@@ -22,7 +22,7 @@
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">
+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.implementation.spring.itests.mock.TestReferenceBean">
<property name="bean" ref="testReference"/>
diff --git a/java/sca/modules/implementation-spring/src/test/resources/META-INF/sca/SpringHelloWorld-context.xml b/java/sca/modules/implementation-spring/src/test/resources/META-INF/sca/SpringHelloWorld-context.xml
index d59205e066..18ce21805c 100644
--- a/java/sca/modules/implementation-spring/src/test/resources/META-INF/sca/SpringHelloWorld-context.xml
+++ b/java/sca/modules/implementation-spring/src/test/resources/META-INF/sca/SpringHelloWorld-context.xml
@@ -23,7 +23,7 @@
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">
+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.implementation.spring.itests.mock.TestHelloWorldBean" lazy-init="true">
</bean>
diff --git a/java/sca/modules/implementation-spring/src/test/resources/META-INF/sca/SpringImplicitReference-context.xml b/java/sca/modules/implementation-spring/src/test/resources/META-INF/sca/SpringImplicitReference-context.xml
index f366c6819f..e6b69e8cad 100644
--- a/java/sca/modules/implementation-spring/src/test/resources/META-INF/sca/SpringImplicitReference-context.xml
+++ b/java/sca/modules/implementation-spring/src/test/resources/META-INF/sca/SpringImplicitReference-context.xml
@@ -22,7 +22,7 @@
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">
+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.implementation.spring.itests.mock.TestReferenceBean">
<!-- Here is the implicit reference - a property with a ref not satisifed within the
diff --git a/java/sca/modules/implementation-spring/src/test/resources/META-INF/sca/testReferenceContext.xml b/java/sca/modules/implementation-spring/src/test/resources/META-INF/sca/testReferenceContext.xml
index aef5a5524b..fdbbeeced2 100644
--- a/java/sca/modules/implementation-spring/src/test/resources/META-INF/sca/testReferenceContext.xml
+++ b/java/sca/modules/implementation-spring/src/test/resources/META-INF/sca/testReferenceContext.xml
@@ -22,7 +22,7 @@
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">
+http://www.springframework.org/schema/sca http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd">
<bean id="testBean" class="org.apache.tuscany.container.spring.mock.TestBeanImpl">
<property name="bean" ref="testReference"/>
diff --git a/java/sca/modules/implementation-spring/src/test/resources/META-INF/sca/testServiceContext.xml b/java/sca/modules/implementation-spring/src/test/resources/META-INF/sca/testServiceContext.xml
index fb9fb03692..6b3f1f9890 100644
--- a/java/sca/modules/implementation-spring/src/test/resources/META-INF/sca/testServiceContext.xml
+++ b/java/sca/modules/implementation-spring/src/test/resources/META-INF/sca/testServiceContext.xml
@@ -22,7 +22,7 @@
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">
+http://www.springframework.org/schema/sca http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd">
<sca:service name="fooService" type="org.apache.tuscany.container.spring.mock.TestBeanImpl" target="testBean"/>
diff --git a/java/sca/modules/implementation-spring/src/test/resources/spring/META-INF/spring/SpringSCAProperty-context.xml b/java/sca/modules/implementation-spring/src/test/resources/spring/META-INF/spring/SpringSCAProperty-context.xml
index 36763a2d7a..f1ee21686d 100644
--- a/java/sca/modules/implementation-spring/src/test/resources/spring/META-INF/spring/SpringSCAProperty-context.xml
+++ b/java/sca/modules/implementation-spring/src/test/resources/spring/META-INF/spring/SpringSCAProperty-context.xml
@@ -1,34 +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.springframework.org/schema/sca/spring-sca.xsd">
-
- <bean id="testBean" class="org.apache.tuscany.sca.implementation.spring.itests.mock.TestSCAPropertyBean" lazy-init="true">
- <property name="hello" ref="TestProperty"/>
- </bean>
-
- <sca:property id="foo" name="TestProperty" type="java.lang.String"/>
-
+<?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.implementation.spring.itests.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/java/sca/modules/implementation-spring/src/test/resources/test.xml b/java/sca/modules/implementation-spring/src/test/resources/test.xml
index 477ca69a38..f2d684f766 100644
--- a/java/sca/modules/implementation-spring/src/test/resources/test.xml
+++ b/java/sca/modules/implementation-spring/src/test/resources/test.xml
@@ -20,7 +20,7 @@
<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">
+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.implementation.spring.itests.mock.TestBeanImpl" />
diff --git a/java/sca/samples/simple-bigbank-spring/src/main/resources/spring-context/Account-spring-context.xml b/java/sca/samples/simple-bigbank-spring/src/main/resources/spring-context/Account-spring-context.xml
index 071092138d..899d8d7d62 100644
--- a/java/sca/samples/simple-bigbank-spring/src/main/resources/spring-context/Account-spring-context.xml
+++ b/java/sca/samples/simple-bigbank-spring/src/main/resources/spring-context/Account-spring-context.xml
@@ -1,53 +1,53 @@
-<?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.springframework.org/schema/sca/spring-sca.xsd">
-
- <!-- <sca:service name="AccountService"
- type="bigbank.account.AccountService" target="AccountServiceBean"/> -->
-
- <bean id="AccountServiceBean" class="bigbank.account.AccountServiceImpl">
- <property name="calculatorService" ref="calculatorService"/>
- <property name="stockQuoteService" ref="stockQuoteService"/>
- <property name="checkingAccountService" ref="checkingAccountService"/>
-
- <!-- Here are some implicit references & properties - a property with a ref not satisifed
- * within the Spring application context.
- -->
- <property name="savingsAccountService" ref="savingsAccountService"/>
- <property name="stockAccountService" ref="stockAccountService"/>
- <property name="currency" value="EURO"/>
- </bean>
-
- <sca:reference name="checkingAccountService" type="bigbank.account.checking.CheckingAccountService"/>
-
- <sca:reference name="calculatorService" type="bigbank.calculator.CalculatorService"/>
-
- <sca:reference name="stockQuoteService" type="bigbank.stockquote.StockQuoteService"/>
-
- <!-- <sca:reference name="savingsAccountServiceRef" type="bigbank.account.savings.SavingsAccountService"/>-->
-
- <!-- <sca:reference name="stockAccountServiceRef" type="bigbank.account.stock.StockAccountService"/>-->
-
-</beans>
+<?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="AccountService"
+ type="bigbank.account.AccountService" target="AccountServiceBean"/> -->
+
+ <bean id="AccountServiceBean" class="bigbank.account.AccountServiceImpl">
+ <property name="calculatorService" ref="calculatorService"/>
+ <property name="stockQuoteService" ref="stockQuoteService"/>
+ <property name="checkingAccountService" ref="checkingAccountService"/>
+
+ <!-- Here are some implicit references & properties - a property with a ref not satisifed
+ * within the Spring application context.
+ -->
+ <property name="savingsAccountService" ref="savingsAccountService"/>
+ <property name="stockAccountService" ref="stockAccountService"/>
+ <property name="currency" value="EURO"/>
+ </bean>
+
+ <sca:reference name="checkingAccountService" type="bigbank.account.checking.CheckingAccountService"/>
+
+ <sca:reference name="calculatorService" type="bigbank.calculator.CalculatorService"/>
+
+ <sca:reference name="stockQuoteService" type="bigbank.stockquote.StockQuoteService"/>
+
+ <!-- <sca:reference name="savingsAccountServiceRef" type="bigbank.account.savings.SavingsAccountService"/>-->
+
+ <!-- <sca:reference name="stockAccountServiceRef" type="bigbank.account.stock.StockAccountService"/>-->
+
+</beans>
diff --git a/java/sca/samples/simple-bigbank-spring/src/main/resources/spring-context/SavingsAccount-context.xml b/java/sca/samples/simple-bigbank-spring/src/main/resources/spring-context/SavingsAccount-context.xml
index 03e6855766..b9e26bf81b 100644
--- a/java/sca/samples/simple-bigbank-spring/src/main/resources/spring-context/SavingsAccount-context.xml
+++ b/java/sca/samples/simple-bigbank-spring/src/main/resources/spring-context/SavingsAccount-context.xml
@@ -1,33 +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.springframework.org/schema/sca/spring-sca.xsd">
-
- <sca:service name="SavingsAccountService"
- type="bigbank.account.savings.SavingsAccountService" target="SavingsAccountServiceBean"/>
-
- <bean id="SavingsAccountServiceBean" class="bigbank.account.savings.SavingsAccountServiceImpl">
- </bean>
-
-</beans>
+<?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="SavingsAccountService"
+ type="bigbank.account.savings.SavingsAccountService" target="SavingsAccountServiceBean"/>
+
+ <bean id="SavingsAccountServiceBean" class="bigbank.account.savings.SavingsAccountServiceImpl">
+ </bean>
+
+</beans>
diff --git a/java/sca/samples/simple-bigbank-spring/src/main/resources/spring-context/StockAccount/META-INF/spring/StockAccount-context.xml b/java/sca/samples/simple-bigbank-spring/src/main/resources/spring-context/StockAccount/META-INF/spring/StockAccount-context.xml
index c68d2f4c24..b30f821f7e 100644
--- a/java/sca/samples/simple-bigbank-spring/src/main/resources/spring-context/StockAccount/META-INF/spring/StockAccount-context.xml
+++ b/java/sca/samples/simple-bigbank-spring/src/main/resources/spring-context/StockAccount/META-INF/spring/StockAccount-context.xml
@@ -1,33 +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.springframework.org/schema/sca/spring-sca.xsd">
-
- <sca:service name="StockAccountService"
- type="bigbank.account.stock.StockAccountService" target="StockAccountServiceBean"/>
-
- <bean id="StockAccountServiceBean" class="bigbank.account.stock.StockAccountServiceImpl">
- </bean>
-
+<?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="StockAccountService"
+ type="bigbank.account.stock.StockAccountService" target="StockAccountServiceBean"/>
+
+ <bean id="StockAccountServiceBean" class="bigbank.account.stock.StockAccountServiceImpl">
+ </bean>
+
</beans> \ No newline at end of file
diff --git a/java/sca/samples/spring-bigbank-calculator/src/main/resources/META-INF/spring/CalculatorService-context.xml b/java/sca/samples/spring-bigbank-calculator/src/main/resources/META-INF/spring/CalculatorService-context.xml
index d6e3a80fc7..42e5f824f9 100644
--- a/java/sca/samples/spring-bigbank-calculator/src/main/resources/META-INF/spring/CalculatorService-context.xml
+++ b/java/sca/samples/spring-bigbank-calculator/src/main/resources/META-INF/spring/CalculatorService-context.xml
@@ -1,45 +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.springframework.org/schema/sca/spring-sca.xsd">
-
- <sca:service name="CalculatorService"
- type="bigbank.calculator.CalculatorService" target="CalculatorServiceBean"/>
-
- <bean id="CalculatorServiceBean" class="bigbank.calculator.CalculatorServiceImpl">
- <!-- Here are some implicit references - a property with a ref not satisifed within the
- * Spring application context.
- -->
- <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="bigbank.calculator.AddService"/>
- <sca:reference name="subtractService" type="bigbank.calculator.SubtractService"/>
- <sca:reference name="multiplyService" type="bigbank.calculator.MultiplyService"/>
- <sca:reference name="divideService" type="bigbank.calculator.DivideService"/>
-
-</beans>
+<?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="bigbank.calculator.CalculatorService" target="CalculatorServiceBean"/>
+
+ <bean id="CalculatorServiceBean" class="bigbank.calculator.CalculatorServiceImpl">
+ <!-- Here are some implicit references - a property with a ref not satisifed within the
+ * Spring application context.
+ -->
+ <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="bigbank.calculator.AddService"/>
+ <sca:reference name="subtractService" type="bigbank.calculator.SubtractService"/>
+ <sca:reference name="multiplyService" type="bigbank.calculator.MultiplyService"/>
+ <sca:reference name="divideService" type="bigbank.calculator.DivideService"/>
+
+</beans>
diff --git a/java/sca/samples/spring-bigbank-checkaccount/src/main/resources/spring-context/META-INF/spring/CheckingAccountService-context.xml b/java/sca/samples/spring-bigbank-checkaccount/src/main/resources/spring-context/META-INF/spring/CheckingAccountService-context.xml
index 66097874da..6b2338f611 100644
--- a/java/sca/samples/spring-bigbank-checkaccount/src/main/resources/spring-context/META-INF/spring/CheckingAccountService-context.xml
+++ b/java/sca/samples/spring-bigbank-checkaccount/src/main/resources/spring-context/META-INF/spring/CheckingAccountService-context.xml
@@ -22,7 +22,7 @@
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">
+ http://www.springframework.org/schema/sca http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd">
<sca:service name="CheckingsAccountService"
type="bigbank.account.checking.CheckingAccountService" target="CheckingAccountServiceBean"/>
diff --git a/java/sca/samples/spring-bigbank-stockquote/pom.xml b/java/sca/samples/spring-bigbank-stockquote/pom.xml
index f4bc9ab98d..97cbc2d329 100644
--- a/java/sca/samples/spring-bigbank-stockquote/pom.xml
+++ b/java/sca/samples/spring-bigbank-stockquote/pom.xml
@@ -83,6 +83,25 @@
<version>4.2</version>
<scope>test</scope>
</dependency>
+
+ <!-- Spring dependencies... -->
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-core</artifactId>
+ <version>2.0.8</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-beans</artifactId>
+ <version>2.0.8</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ <version>2.0.8</version>
+ </dependency>
</dependencies>
diff --git a/java/sca/samples/spring-bigbank-stockquote/src/main/java/bigbank/stockquote/server/SCAApplicationContextProvider.java b/java/sca/samples/spring-bigbank-stockquote/src/main/java/bigbank/stockquote/server/SCAApplicationContextProvider.java
new file mode 100644
index 0000000000..643f9a187c
--- /dev/null
+++ b/java/sca/samples/spring-bigbank-stockquote/src/main/java/bigbank/stockquote/server/SCAApplicationContextProvider.java
@@ -0,0 +1,19 @@
+package bigbank.stockquote.server;
+
+import org.springframework.beans.BeansException;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.ApplicationContextAware;
+
+public class SCAApplicationContextProvider implements ApplicationContextAware {
+
+ private static ApplicationContext ctx;
+
+ public void setApplicationContext(ApplicationContext appContext) throws BeansException {
+ // Wiring the ApplicationContext into a static method
+ ctx = appContext;
+ }
+
+ public static ApplicationContext getApplicationContext() {
+ return ctx;
+ }
+}
diff --git a/java/sca/samples/spring-bigbank-stockquote/src/main/java/bigbank/stockquote/server/StockQuoteServer.java b/java/sca/samples/spring-bigbank-stockquote/src/main/java/bigbank/stockquote/server/StockQuoteServer.java
index 41ea8d35c8..b9abb53eb4 100644
--- a/java/sca/samples/spring-bigbank-stockquote/src/main/java/bigbank/stockquote/server/StockQuoteServer.java
+++ b/java/sca/samples/spring-bigbank-stockquote/src/main/java/bigbank/stockquote/server/StockQuoteServer.java
@@ -20,6 +20,7 @@ package bigbank.stockquote.server;
import org.apache.tuscany.sca.node.SCANode;
import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.springframework.context.ApplicationContext;
/**
* This server program shows how to bootstrap SCA from a simple J2SE program
@@ -34,12 +35,16 @@ public class StockQuoteServer {
SCANodeFactory factory = SCANodeFactory.newInstance();
SCANode node = factory.createSCANodeFromClassLoader("StockQuote.composite", StockQuoteServer.class.getClassLoader());
node.start();
-
+
+ // Method 1: To access the Spring Application Context instance
+ ApplicationContext ctx = SCAApplicationContextProvider.getApplicationContext();
+ if (ctx.containsBean("StockQuoteServiceBean"))
+ System.out.println("StockQuoteServiceBean is now available for use...");
+
System.out.println("Press Enter to Exit...");
System.in.read();
node.stop();
System.out.println("Bye");
}
-
}
diff --git a/java/sca/samples/spring-bigbank-stockquote/src/main/resources/META-INF/spring/StockQuoteService-context.xml b/java/sca/samples/spring-bigbank-stockquote/src/main/resources/META-INF/spring/StockQuoteService-context.xml
index 185846deb7..87dd006b5a 100644
--- a/java/sca/samples/spring-bigbank-stockquote/src/main/resources/META-INF/spring/StockQuoteService-context.xml
+++ b/java/sca/samples/spring-bigbank-stockquote/src/main/resources/META-INF/spring/StockQuoteService-context.xml
@@ -1,33 +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.springframework.org/schema/sca/spring-sca.xsd">
-
- <sca:service name="StockQuoteService"
- type="bigbank.stockquote.StockQuoteService" target="StockQuoteServiceBean"/>
-
- <bean id="StockQuoteServiceBean" class="bigbank.stockquote.StockQuoteImpl">
- </bean>
-
-</beans>
+<?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="bigbank.stockquote.server.SCAApplicationContextProvider">
+ </bean>
+
+</beans> \ No newline at end of file