summaryrefslogtreecommitdiffstats
path: root/java/sca/itest/implementation-spring
diff options
context:
space:
mode:
authorramkumar <ramkumar@13f79535-47bb-0310-9956-ffa450edef68>2009-07-22 12:05:12 +0000
committerramkumar <ramkumar@13f79535-47bb-0310-9956-ffa450edef68>2009-07-22 12:05:12 +0000
commit17437a5fab2eae345e1b9ede33d95b97417bcdfa (patch)
tree358f0ed3988488dd6692ed4875fc1b6177d0a751 /java/sca/itest/implementation-spring
parentbcd0a070dda7d130d703fe86d0efe5e526226e5f (diff)
Fixes in itest for the spring classloader changes ref: TUSCANY-3069 in 1.x
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@796683 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/itest/implementation-spring')
-rw-r--r--java/sca/itest/implementation-spring/src/main/resources/META-INF/sca/implementation-policies/CalculatorService-context.xml39
-rw-r--r--java/sca/itest/implementation-spring/src/main/resources/context/access/CalculatorService-context.xml (renamed from java/sca/itest/implementation-spring/src/main/resources/META-INF/sca/context-access/CalculatorService-context.xml)0
-rw-r--r--java/sca/itest/implementation-spring/src/main/resources/context/access/ContextAccess.composite2
-rw-r--r--java/sca/itest/implementation-spring/src/main/resources/context/imports/ContextImports.composite2
-rw-r--r--java/sca/itest/implementation-spring/src/main/resources/context/imports/META-INF/spring/CalculatorService-context.xml (renamed from java/sca/itest/implementation-spring/src/main/resources/CalculatorService-context.xml)0
-rw-r--r--java/sca/itest/implementation-spring/src/main/resources/context/imports/META-INF/spring/SpringImport-context.xml (renamed from java/sca/itest/implementation-spring/src/main/resources/META-INF/sca/context-imports/SpringImport-context.xml)0
-rw-r--r--java/sca/itest/implementation-spring/src/main/resources/context/multiple/META-INF/spring/SpringHelloWorld-context.xml (renamed from java/sca/itest/implementation-spring/src/main/resources/META-INF/sca/SpringHelloWorld-context.xml)0
-rw-r--r--java/sca/itest/implementation-spring/src/main/resources/context/multiple/META-INF/spring/StockQuoteService-context.xml (renamed from java/sca/itest/implementation-spring/src/main/resources/META-INF/sca/context-multiple/StockQuoteService-context.xml)0
-rw-r--r--java/sca/itest/implementation-spring/src/main/resources/context/multiple/META-INF/spring/beanRefContext.xml (renamed from java/sca/itest/implementation-spring/src/main/resources/META-INF/sca/context-multiple/beanRefContext.xml)4
-rw-r--r--java/sca/itest/implementation-spring/src/main/resources/context/multiple/MultipleContext.composite2
-rw-r--r--java/sca/itest/implementation-spring/src/main/resources/implementation/policies/ImplementationPolicies.composite4
-rw-r--r--java/sca/itest/implementation-spring/src/main/resources/implementation/policies/META-INF/spring/CalculatorService-context.xml (renamed from java/sca/itest/implementation-spring/src/main/resources/META-INF/sca/context-imports/CalculatorService-context.xml)0
-rw-r--r--java/sca/itest/implementation-spring/src/main/resources/location/folder/SpringFolderLocation.composite2
-rw-r--r--java/sca/itest/implementation-spring/src/main/resources/location/folder/springapp/META-INF/MANIFEST.MF (renamed from java/sca/itest/implementation-spring/src/main/resources/META-INF/sca/location-folder/META-INF/MANIFEST.MF)0
-rw-r--r--java/sca/itest/implementation-spring/src/main/resources/location/folder/springapp/META-INF/spring/SpringSCAProperty-context.xml (renamed from java/sca/itest/implementation-spring/src/main/resources/META-INF/sca/location-folder/META-INF/spring/SpringSCAProperty-context.xml)0
-rw-r--r--java/sca/itest/implementation-spring/src/main/resources/location/jar/SpringJarLocation.composite2
-rw-r--r--java/sca/itest/implementation-spring/src/main/resources/location/jar/spring-context.jar (renamed from java/sca/itest/implementation-spring/src/main/resources/META-INF/sca/location-jar/spring-context.jar)bin1454 -> 1454 bytes
-rw-r--r--java/sca/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/META-INF/spring/SpringDelegationHelloWorld-context.xml (renamed from java/sca/itest/implementation-spring/src/main/resources/META-INF/sca/SpringDelegationHelloWorld-context.xml)0
-rw-r--r--java/sca/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/META-INF/spring/SpringHelloWorld-context.xml (renamed from java/sca/itest/implementation-spring/src/main/resources/META-INF/sca/context-multiple/SpringHelloWorld-context.xml)0
-rw-r--r--java/sca/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorld.composite2
-rw-r--r--java/sca/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringHelloWorld.composite2
-rw-r--r--java/sca/itest/implementation-spring/src/main/resources/sca/references/META-INF/spring/SpringExplicitReference-context.xml (renamed from java/sca/itest/implementation-spring/src/main/resources/META-INF/sca/sca-references/SpringExplicitReference-context.xml)0
-rw-r--r--java/sca/itest/implementation-spring/src/main/resources/sca/references/META-INF/spring/SpringImplicitReference-context.xml (renamed from java/sca/itest/implementation-spring/src/main/resources/META-INF/sca/sca-references/SpringImplicitReference-context.xml)0
-rw-r--r--java/sca/itest/implementation-spring/src/main/resources/sca/references/SpringExplicitReference.composite2
-rw-r--r--java/sca/itest/implementation-spring/src/main/resources/sca/references/SpringImplicitReference.composite2
-rw-r--r--java/sca/itest/implementation-spring/src/main/resources/sca/services/META-INF/spring/SpringExplicitService-context.xml (renamed from java/sca/itest/implementation-spring/src/main/resources/META-INF/sca/sca-services/SpringExplicitService-context.xml)0
-rw-r--r--java/sca/itest/implementation-spring/src/main/resources/sca/services/META-INF/spring/SpringImplicitService-context.xml (renamed from java/sca/itest/implementation-spring/src/main/resources/META-INF/sca/sca-services/SpringImplicitService-context.xml)0
-rw-r--r--java/sca/itest/implementation-spring/src/main/resources/sca/services/SpringExplicitService.composite2
-rw-r--r--java/sca/itest/implementation-spring/src/main/resources/sca/services/SpringImplicitService.composite2
-rw-r--r--java/sca/itest/implementation-spring/src/main/resources/spring/annotations/Calculator.composite4
-rw-r--r--java/sca/itest/implementation-spring/src/main/resources/spring/annotations/CalculatorService-context.xml (renamed from java/sca/itest/implementation-spring/src/main/resources/META-INF/sca/spring-annotation/CalculatorService-context.xml)0
-rw-r--r--java/sca/itest/implementation-spring/src/test/java/context/access/CalculatorClient.java7
-rw-r--r--java/sca/itest/implementation-spring/src/test/java/context/imports/CalculatorClient.java10
-rw-r--r--java/sca/itest/implementation-spring/src/test/java/context/multiple/StockQuoteServer.java9
-rw-r--r--java/sca/itest/implementation-spring/src/test/java/implementation/policies/CalculatorClient.java10
-rw-r--r--java/sca/itest/implementation-spring/src/test/java/implementation/policies/ImplementationPoliciesTestCase.java3
-rw-r--r--java/sca/itest/implementation-spring/src/test/java/location/folder/SpringFolderLocationTestCase.java4
-rw-r--r--java/sca/itest/implementation-spring/src/test/java/location/jar/SpringJarLocationTestCase.java4
-rw-r--r--java/sca/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractHelloWorldTestCase.java6
-rw-r--r--java/sca/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractSCATestCase.java23
-rw-r--r--java/sca/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorldTestCase.java4
-rw-r--r--java/sca/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringHelloWorldTestCase.java6
-rw-r--r--java/sca/itest/implementation-spring/src/test/java/sca/references/SpringExplicitReferenceTestCase.java4
-rw-r--r--java/sca/itest/implementation-spring/src/test/java/sca/references/SpringImplicitReferenceTestCase.java4
-rw-r--r--java/sca/itest/implementation-spring/src/test/java/sca/services/SpringExplicitServiceTestCase.java4
-rw-r--r--java/sca/itest/implementation-spring/src/test/java/sca/services/SpringImplicitServiceTestCase.java4
-rw-r--r--java/sca/itest/implementation-spring/src/test/java/spring/annotations/CalculatorClient.java18
47 files changed, 95 insertions, 98 deletions
diff --git a/java/sca/itest/implementation-spring/src/main/resources/META-INF/sca/implementation-policies/CalculatorService-context.xml b/java/sca/itest/implementation-spring/src/main/resources/META-INF/sca/implementation-policies/CalculatorService-context.xml
deleted file mode 100644
index c50f0ef4d9..0000000000
--- a/java/sca/itest/implementation-spring/src/main/resources/META-INF/sca/implementation-policies/CalculatorService-context.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:sca="http://www.springframework.org/schema/sca"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/sca http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd">
-
- <bean id="CalculatorServiceBean" class="calculator.CalculatorServiceImpl">
- <property name="addService" ref="addService"/>
- <property name="subtractService" ref="subtractService"/>
- <property name="multiplyService" ref="multiplyService"/>
- <property name="divideService" ref="divideService"/>
- </bean>
-
- <sca:reference name="addService" type="calculator.AddService"/>
- <sca:reference name="subtractService" type="calculator.SubtractService"/>
- <sca:reference name="multiplyService" type="calculator.MultiplyService"/>
- <sca:reference name="divideService" type="calculator.DivideService"/>
-
-</beans>
diff --git a/java/sca/itest/implementation-spring/src/main/resources/META-INF/sca/context-access/CalculatorService-context.xml b/java/sca/itest/implementation-spring/src/main/resources/context/access/CalculatorService-context.xml
index 81d59432b8..81d59432b8 100644
--- a/java/sca/itest/implementation-spring/src/main/resources/META-INF/sca/context-access/CalculatorService-context.xml
+++ b/java/sca/itest/implementation-spring/src/main/resources/context/access/CalculatorService-context.xml
diff --git a/java/sca/itest/implementation-spring/src/main/resources/context/access/ContextAccess.composite b/java/sca/itest/implementation-spring/src/main/resources/context/access/ContextAccess.composite
index 209f2cb065..abdaa98bff 100644
--- a/java/sca/itest/implementation-spring/src/main/resources/context/access/ContextAccess.composite
+++ b/java/sca/itest/implementation-spring/src/main/resources/context/access/ContextAccess.composite
@@ -24,7 +24,7 @@
xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1">
<component name="CalculatorServiceComponent">
- <implementation.spring location="META-INF/sca/context-access/CalculatorService-context.xml"/>
+ <implementation.spring location="CalculatorService-context.xml"/>
<reference name="addService" target="AddServiceComponent" />
<reference name="subtractService" target="SubtractServiceComponent" />
<reference name="multiplyService" target="MultiplyServiceComponent" />
diff --git a/java/sca/itest/implementation-spring/src/main/resources/context/imports/ContextImports.composite b/java/sca/itest/implementation-spring/src/main/resources/context/imports/ContextImports.composite
index 9829b79104..dd186bddfc 100644
--- a/java/sca/itest/implementation-spring/src/main/resources/context/imports/ContextImports.composite
+++ b/java/sca/itest/implementation-spring/src/main/resources/context/imports/ContextImports.composite
@@ -24,7 +24,7 @@
xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1">
<component name="CalculatorServiceComponent">
- <implementation.spring location="META-INF/sca/context-imports/SpringImport-context.xml"/>
+ <implementation.spring location="META-INF/spring/SpringImport-context.xml"/>
<reference name="addService" target="AddServiceComponent" />
<reference name="subtractService" target="SubtractServiceComponent" />
<reference name="multiplyService" target="MultiplyServiceComponent" />
diff --git a/java/sca/itest/implementation-spring/src/main/resources/CalculatorService-context.xml b/java/sca/itest/implementation-spring/src/main/resources/context/imports/META-INF/spring/CalculatorService-context.xml
index c50f0ef4d9..c50f0ef4d9 100644
--- a/java/sca/itest/implementation-spring/src/main/resources/CalculatorService-context.xml
+++ b/java/sca/itest/implementation-spring/src/main/resources/context/imports/META-INF/spring/CalculatorService-context.xml
diff --git a/java/sca/itest/implementation-spring/src/main/resources/META-INF/sca/context-imports/SpringImport-context.xml b/java/sca/itest/implementation-spring/src/main/resources/context/imports/META-INF/spring/SpringImport-context.xml
index a0bb10e8dd..a0bb10e8dd 100644
--- a/java/sca/itest/implementation-spring/src/main/resources/META-INF/sca/context-imports/SpringImport-context.xml
+++ b/java/sca/itest/implementation-spring/src/main/resources/context/imports/META-INF/spring/SpringImport-context.xml
diff --git a/java/sca/itest/implementation-spring/src/main/resources/META-INF/sca/SpringHelloWorld-context.xml b/java/sca/itest/implementation-spring/src/main/resources/context/multiple/META-INF/spring/SpringHelloWorld-context.xml
index 62e4e077b6..62e4e077b6 100644
--- a/java/sca/itest/implementation-spring/src/main/resources/META-INF/sca/SpringHelloWorld-context.xml
+++ b/java/sca/itest/implementation-spring/src/main/resources/context/multiple/META-INF/spring/SpringHelloWorld-context.xml
diff --git a/java/sca/itest/implementation-spring/src/main/resources/META-INF/sca/context-multiple/StockQuoteService-context.xml b/java/sca/itest/implementation-spring/src/main/resources/context/multiple/META-INF/spring/StockQuoteService-context.xml
index 5b1885d6b3..5b1885d6b3 100644
--- a/java/sca/itest/implementation-spring/src/main/resources/META-INF/sca/context-multiple/StockQuoteService-context.xml
+++ b/java/sca/itest/implementation-spring/src/main/resources/context/multiple/META-INF/spring/StockQuoteService-context.xml
diff --git a/java/sca/itest/implementation-spring/src/main/resources/META-INF/sca/context-multiple/beanRefContext.xml b/java/sca/itest/implementation-spring/src/main/resources/context/multiple/META-INF/spring/beanRefContext.xml
index 244e730921..1bb3b2c146 100644
--- a/java/sca/itest/implementation-spring/src/main/resources/META-INF/sca/context-multiple/beanRefContext.xml
+++ b/java/sca/itest/implementation-spring/src/main/resources/context/multiple/META-INF/spring/beanRefContext.xml
@@ -27,8 +27,8 @@
<bean id="beanRefFactory" class="org.springframework.context.support.ClassPathXmlApplicationContext">
<constructor-arg>
<list>
- <value>META-INF/sca/context-multiple/StockQuoteService-context.xml</value>
- <value>META-INF/sca/context-multiple/SpringHelloWorld-context.xml</value>
+ <value>META-INF/spring/StockQuoteService-context.xml</value>
+ <value>META-INF/spring/SpringHelloWorld-context.xml</value>
</list>
</constructor-arg>
</bean>
diff --git a/java/sca/itest/implementation-spring/src/main/resources/context/multiple/MultipleContext.composite b/java/sca/itest/implementation-spring/src/main/resources/context/multiple/MultipleContext.composite
index 1a66ff20f1..5acdc77d1a 100644
--- a/java/sca/itest/implementation-spring/src/main/resources/context/multiple/MultipleContext.composite
+++ b/java/sca/itest/implementation-spring/src/main/resources/context/multiple/MultipleContext.composite
@@ -29,7 +29,7 @@
</service>
<component name="StockQuoteServiceComponent">
- <implementation.spring location="META-INF/sca/context-multiple/beanRefContext.xml"/>
+ <implementation.spring location="META-INF/spring/beanRefContext.xml"/>
</component>
</composite>
diff --git a/java/sca/itest/implementation-spring/src/main/resources/implementation/policies/ImplementationPolicies.composite b/java/sca/itest/implementation-spring/src/main/resources/implementation/policies/ImplementationPolicies.composite
index 9d8068368b..1179566749 100644
--- a/java/sca/itest/implementation-spring/src/main/resources/implementation/policies/ImplementationPolicies.composite
+++ b/java/sca/itest/implementation-spring/src/main/resources/implementation/policies/ImplementationPolicies.composite
@@ -24,7 +24,7 @@
xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1">
<component name="CalculatorServiceComponent">
- <implementation.spring location="META-INF/sca/implementation-policies/CalculatorService-context.xml"/>
+ <implementation.spring location="META-INF/spring/CalculatorService-context.xml"/>
<reference name="addService" target="AddServiceComponent" />
<reference name="subtractService" target="SubtractServiceComponent" />
<reference name="multiplyService" target="MultiplyServiceComponent" />
@@ -48,7 +48,7 @@
</component>
<component name="AnotherCalculatorServiceComponent">
- <implementation.spring location="META-INF/sca/implementation-policies/CalculatorService-context.xml" requires="tuscany:logging"/>
+ <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" />
diff --git a/java/sca/itest/implementation-spring/src/main/resources/META-INF/sca/context-imports/CalculatorService-context.xml b/java/sca/itest/implementation-spring/src/main/resources/implementation/policies/META-INF/spring/CalculatorService-context.xml
index c50f0ef4d9..c50f0ef4d9 100644
--- a/java/sca/itest/implementation-spring/src/main/resources/META-INF/sca/context-imports/CalculatorService-context.xml
+++ b/java/sca/itest/implementation-spring/src/main/resources/implementation/policies/META-INF/spring/CalculatorService-context.xml
diff --git a/java/sca/itest/implementation-spring/src/main/resources/location/folder/SpringFolderLocation.composite b/java/sca/itest/implementation-spring/src/main/resources/location/folder/SpringFolderLocation.composite
index 9c5cf9be65..d7b3c5a6e6 100644
--- a/java/sca/itest/implementation-spring/src/main/resources/location/folder/SpringFolderLocation.composite
+++ b/java/sca/itest/implementation-spring/src/main/resources/location/folder/SpringFolderLocation.composite
@@ -32,7 +32,7 @@
</component>
<component name="HelloWorldComponent">
- <implementation.spring location="META-INF/sca/location-folder"/>
+ <implementation.spring location="springapp"/>
<property name="TestProperty">Hello</property>
</component>
diff --git a/java/sca/itest/implementation-spring/src/main/resources/META-INF/sca/location-folder/META-INF/MANIFEST.MF b/java/sca/itest/implementation-spring/src/main/resources/location/folder/springapp/META-INF/MANIFEST.MF
index 950dbeba4c..950dbeba4c 100644
--- a/java/sca/itest/implementation-spring/src/main/resources/META-INF/sca/location-folder/META-INF/MANIFEST.MF
+++ b/java/sca/itest/implementation-spring/src/main/resources/location/folder/springapp/META-INF/MANIFEST.MF
diff --git a/java/sca/itest/implementation-spring/src/main/resources/META-INF/sca/location-folder/META-INF/spring/SpringSCAProperty-context.xml b/java/sca/itest/implementation-spring/src/main/resources/location/folder/springapp/META-INF/spring/SpringSCAProperty-context.xml
index 8613e6c82a..8613e6c82a 100644
--- a/java/sca/itest/implementation-spring/src/main/resources/META-INF/sca/location-folder/META-INF/spring/SpringSCAProperty-context.xml
+++ b/java/sca/itest/implementation-spring/src/main/resources/location/folder/springapp/META-INF/spring/SpringSCAProperty-context.xml
diff --git a/java/sca/itest/implementation-spring/src/main/resources/location/jar/SpringJarLocation.composite b/java/sca/itest/implementation-spring/src/main/resources/location/jar/SpringJarLocation.composite
index fb8b4255fb..fb31d2d612 100644
--- a/java/sca/itest/implementation-spring/src/main/resources/location/jar/SpringJarLocation.composite
+++ b/java/sca/itest/implementation-spring/src/main/resources/location/jar/SpringJarLocation.composite
@@ -32,7 +32,7 @@
</component>
<component name="HelloWorldComponent">
- <implementation.spring location="META-INF/sca/location-jar/spring-context.jar"/>
+ <implementation.spring location="spring-context.jar"/>
<property name="TestProperty">Hello</property>
</component>
diff --git a/java/sca/itest/implementation-spring/src/main/resources/META-INF/sca/location-jar/spring-context.jar b/java/sca/itest/implementation-spring/src/main/resources/location/jar/spring-context.jar
index 504d59e5ff..504d59e5ff 100644
--- a/java/sca/itest/implementation-spring/src/main/resources/META-INF/sca/location-jar/spring-context.jar
+++ b/java/sca/itest/implementation-spring/src/main/resources/location/jar/spring-context.jar
Binary files differ
diff --git a/java/sca/itest/implementation-spring/src/main/resources/META-INF/sca/SpringDelegationHelloWorld-context.xml b/java/sca/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/META-INF/spring/SpringDelegationHelloWorld-context.xml
index 9912624870..9912624870 100644
--- a/java/sca/itest/implementation-spring/src/main/resources/META-INF/sca/SpringDelegationHelloWorld-context.xml
+++ b/java/sca/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/META-INF/spring/SpringDelegationHelloWorld-context.xml
diff --git a/java/sca/itest/implementation-spring/src/main/resources/META-INF/sca/context-multiple/SpringHelloWorld-context.xml b/java/sca/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/META-INF/spring/SpringHelloWorld-context.xml
index 62e4e077b6..62e4e077b6 100644
--- a/java/sca/itest/implementation-spring/src/main/resources/META-INF/sca/context-multiple/SpringHelloWorld-context.xml
+++ b/java/sca/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/META-INF/spring/SpringHelloWorld-context.xml
diff --git a/java/sca/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorld.composite b/java/sca/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorld.composite
index c2fc0f2e75..be6a336701 100644
--- a/java/sca/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorld.composite
+++ b/java/sca/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorld.composite
@@ -26,7 +26,7 @@
</component>
<component name="HelloWorldComponent">
- <implementation.spring location="META-INF/sca/SpringDelegationHelloWorld-context.xml"/>
+ <implementation.spring location="META-INF/spring/SpringDelegationHelloWorld-context.xml"/>
</component>
</composite>
diff --git a/java/sca/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringHelloWorld.composite b/java/sca/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringHelloWorld.composite
index 1b18f3def8..2273986365 100644
--- a/java/sca/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringHelloWorld.composite
+++ b/java/sca/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringHelloWorld.composite
@@ -26,7 +26,7 @@
</component>
<component name="HelloWorldComponent">
- <implementation.spring location="META-INF/sca/SpringHelloWorld-context.xml"/>
+ <implementation.spring location="META-INF/spring/SpringHelloWorld-context.xml"/>
</component>
</composite>
diff --git a/java/sca/itest/implementation-spring/src/main/resources/META-INF/sca/sca-references/SpringExplicitReference-context.xml b/java/sca/itest/implementation-spring/src/main/resources/sca/references/META-INF/spring/SpringExplicitReference-context.xml
index 1705164104..1705164104 100644
--- a/java/sca/itest/implementation-spring/src/main/resources/META-INF/sca/sca-references/SpringExplicitReference-context.xml
+++ b/java/sca/itest/implementation-spring/src/main/resources/sca/references/META-INF/spring/SpringExplicitReference-context.xml
diff --git a/java/sca/itest/implementation-spring/src/main/resources/META-INF/sca/sca-references/SpringImplicitReference-context.xml b/java/sca/itest/implementation-spring/src/main/resources/sca/references/META-INF/spring/SpringImplicitReference-context.xml
index 539dfa6e32..539dfa6e32 100644
--- a/java/sca/itest/implementation-spring/src/main/resources/META-INF/sca/sca-references/SpringImplicitReference-context.xml
+++ b/java/sca/itest/implementation-spring/src/main/resources/sca/references/META-INF/spring/SpringImplicitReference-context.xml
diff --git a/java/sca/itest/implementation-spring/src/main/resources/sca/references/SpringExplicitReference.composite b/java/sca/itest/implementation-spring/src/main/resources/sca/references/SpringExplicitReference.composite
index 7d73b287bb..4ef561dbfe 100644
--- a/java/sca/itest/implementation-spring/src/main/resources/sca/references/SpringExplicitReference.composite
+++ b/java/sca/itest/implementation-spring/src/main/resources/sca/references/SpringExplicitReference.composite
@@ -21,7 +21,7 @@
name="SpringExplicitReference">
<component name="ClientComponent">
- <implementation.spring location="META-INF/sca/sca-references/SpringExplicitReference-context.xml"/>
+ <implementation.spring location="META-INF/spring/SpringExplicitReference-context.xml"/>
<reference name="testReference" target="ExplicitReferenceComponent"/>
</component>
diff --git a/java/sca/itest/implementation-spring/src/main/resources/sca/references/SpringImplicitReference.composite b/java/sca/itest/implementation-spring/src/main/resources/sca/references/SpringImplicitReference.composite
index 476a82adb9..c9c307b309 100644
--- a/java/sca/itest/implementation-spring/src/main/resources/sca/references/SpringImplicitReference.composite
+++ b/java/sca/itest/implementation-spring/src/main/resources/sca/references/SpringImplicitReference.composite
@@ -28,7 +28,7 @@
name="SpringImplicitReference">
<component name="ClientComponent">
- <implementation.spring location="META-INF/sca/sca-references/SpringImplicitReference-context.xml"/>
+ <implementation.spring location="META-INF/spring/SpringImplicitReference-context.xml"/>
<reference name="testReference" target="ImplicitReferenceComponent"/>
</component>
diff --git a/java/sca/itest/implementation-spring/src/main/resources/META-INF/sca/sca-services/SpringExplicitService-context.xml b/java/sca/itest/implementation-spring/src/main/resources/sca/services/META-INF/spring/SpringExplicitService-context.xml
index 42e0cdbd23..42e0cdbd23 100644
--- a/java/sca/itest/implementation-spring/src/main/resources/META-INF/sca/sca-services/SpringExplicitService-context.xml
+++ b/java/sca/itest/implementation-spring/src/main/resources/sca/services/META-INF/spring/SpringExplicitService-context.xml
diff --git a/java/sca/itest/implementation-spring/src/main/resources/META-INF/sca/sca-services/SpringImplicitService-context.xml b/java/sca/itest/implementation-spring/src/main/resources/sca/services/META-INF/spring/SpringImplicitService-context.xml
index 83558e8abc..83558e8abc 100644
--- a/java/sca/itest/implementation-spring/src/main/resources/META-INF/sca/sca-services/SpringImplicitService-context.xml
+++ b/java/sca/itest/implementation-spring/src/main/resources/sca/services/META-INF/spring/SpringImplicitService-context.xml
diff --git a/java/sca/itest/implementation-spring/src/main/resources/sca/services/SpringExplicitService.composite b/java/sca/itest/implementation-spring/src/main/resources/sca/services/SpringExplicitService.composite
index b367399ed4..23a33a1545 100644
--- a/java/sca/itest/implementation-spring/src/main/resources/sca/services/SpringExplicitService.composite
+++ b/java/sca/itest/implementation-spring/src/main/resources/sca/services/SpringExplicitService.composite
@@ -27,7 +27,7 @@
</component>
<component name="ExplicitServiceComponent">
- <implementation.spring location="META-INF/sca/sca-services/SpringExplicitService-context.xml"/>
+ <implementation.spring location="META-INF/spring/SpringExplicitService-context.xml"/>
</component>
</composite>
diff --git a/java/sca/itest/implementation-spring/src/main/resources/sca/services/SpringImplicitService.composite b/java/sca/itest/implementation-spring/src/main/resources/sca/services/SpringImplicitService.composite
index 8d5b901378..847372680d 100644
--- a/java/sca/itest/implementation-spring/src/main/resources/sca/services/SpringImplicitService.composite
+++ b/java/sca/itest/implementation-spring/src/main/resources/sca/services/SpringImplicitService.composite
@@ -26,7 +26,7 @@
</component>
<component name="ImplicitServiceComponent">
- <implementation.spring location="META-INF/sca/sca-services/SpringImplicitService-context.xml"/>
+ <implementation.spring location="META-INF/spring/SpringImplicitService-context.xml"/>
</component>
</composite>
diff --git a/java/sca/itest/implementation-spring/src/main/resources/spring/annotations/Calculator.composite b/java/sca/itest/implementation-spring/src/main/resources/spring/annotations/Calculator.composite
index 2cb8037c72..236e2b23e6 100644
--- a/java/sca/itest/implementation-spring/src/main/resources/spring/annotations/Calculator.composite
+++ b/java/sca/itest/implementation-spring/src/main/resources/spring/annotations/Calculator.composite
@@ -24,7 +24,7 @@
xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1">
<component name="CalculatorServiceComponent">
- <implementation.spring location="META-INF/sca/spring-annotation/CalculatorService-context.xml"/>
+ <implementation.spring location="CalculatorService-context.xml"/>
<property name="message">HelloWorld</property>
<reference name="addService" target="AddServiceComponent" />
<reference name="subtractService" target="SubtractServiceComponent" />
@@ -49,7 +49,7 @@
</component>
<!--<component name="AnotherCalculatorServiceComponent">
- <implementation.spring location="META-INF/sca/spring-annotation/CalculatorService-context.xml"/>
+ <implementation.spring location="CalculatorService-context.xml"/>
<property name="message">HelloWorld</property>
<reference name="addService" target="AddServiceComponent" />
<reference name="subtractService" target="SubtractServiceComponent" />
diff --git a/java/sca/itest/implementation-spring/src/main/resources/META-INF/sca/spring-annotation/CalculatorService-context.xml b/java/sca/itest/implementation-spring/src/main/resources/spring/annotations/CalculatorService-context.xml
index 4a873f2424..4a873f2424 100644
--- a/java/sca/itest/implementation-spring/src/main/resources/META-INF/sca/spring-annotation/CalculatorService-context.xml
+++ b/java/sca/itest/implementation-spring/src/main/resources/spring/annotations/CalculatorService-context.xml
diff --git a/java/sca/itest/implementation-spring/src/test/java/context/access/CalculatorClient.java b/java/sca/itest/implementation-spring/src/test/java/context/access/CalculatorClient.java
index dbbec2e91f..4503294f10 100644
--- a/java/sca/itest/implementation-spring/src/test/java/context/access/CalculatorClient.java
+++ b/java/sca/itest/implementation-spring/src/test/java/context/access/CalculatorClient.java
@@ -19,8 +19,8 @@
package context.access;
+import java.io.File;
import org.apache.tuscany.sca.node.Client;
-import org.apache.tuscany.sca.node.ContributionLocationHelper;
import org.apache.tuscany.sca.node.Node;
import org.apache.tuscany.sca.node.NodeFactory;
import org.apache.tuscany.sca.node.Contribution;
@@ -36,8 +36,9 @@ import calculator.CalculatorService;
public class CalculatorClient {
public static void main(String[] args) throws Exception {
- String location = ContributionLocationHelper.getContributionLocation("context/access/ContextAccess.composite");
- Node node = NodeFactory.newInstance().createNode("context/access/ContextAccess.composite", new Contribution("c1", location));
+ NodeFactory factory = NodeFactory.newInstance();
+ Node node = factory.createNode(new File("src/main/resources/context/access/ContextAccess.composite").toURI().toURL().toString(),
+ new Contribution("TestContribution", new File("src/main/resources/context/access/").toURI().toURL().toString()));
node.start();
// Code: To access the Spring Application Context instance
diff --git a/java/sca/itest/implementation-spring/src/test/java/context/imports/CalculatorClient.java b/java/sca/itest/implementation-spring/src/test/java/context/imports/CalculatorClient.java
index 47a040c6dd..254b8100e1 100644
--- a/java/sca/itest/implementation-spring/src/test/java/context/imports/CalculatorClient.java
+++ b/java/sca/itest/implementation-spring/src/test/java/context/imports/CalculatorClient.java
@@ -19,8 +19,9 @@
package context.imports;
+import java.io.File;
+
import org.apache.tuscany.sca.node.Client;
-import org.apache.tuscany.sca.node.ContributionLocationHelper;
import org.apache.tuscany.sca.node.Node;
import org.apache.tuscany.sca.node.NodeFactory;
import org.apache.tuscany.sca.node.Contribution;
@@ -33,9 +34,10 @@ import calculator.CalculatorService;
public class CalculatorClient {
public static void main(String[] args) throws Exception {
- String location = ContributionLocationHelper.getContributionLocation("context/imports/ContextImports.composite");
- Node node = NodeFactory.newInstance().createNode("context/imports/ContextImports.composite", new Contribution("c1", location));
- node.start();
+ NodeFactory factory = NodeFactory.newInstance();
+ Node node = factory.createNode(new File("src/main/resources/context/imports/ContextImports.composite").toURI().toURL().toString(),
+ new Contribution("TestContribution", new File("src/main/resources/context/imports/").toURI().toURL().toString()));
+ node.start();
CalculatorService calculatorService =
((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
diff --git a/java/sca/itest/implementation-spring/src/test/java/context/multiple/StockQuoteServer.java b/java/sca/itest/implementation-spring/src/test/java/context/multiple/StockQuoteServer.java
index 1b48150043..9ff1b74567 100644
--- a/java/sca/itest/implementation-spring/src/test/java/context/multiple/StockQuoteServer.java
+++ b/java/sca/itest/implementation-spring/src/test/java/context/multiple/StockQuoteServer.java
@@ -18,6 +18,8 @@
*/
package context.multiple;
+import java.io.File;
+
import org.apache.tuscany.sca.node.Contribution;
import org.apache.tuscany.sca.node.ContributionLocationHelper;
import org.apache.tuscany.sca.node.Node;
@@ -33,10 +35,9 @@ public class StockQuoteServer {
public static void main(String[] args) throws Exception {
- System.out.println("Starting the Sample SCA StockQuote Service...");
-
- String location = ContributionLocationHelper.getContributionLocation("context/multiple/MultipleContext.composite");
- Node node = NodeFactory.newInstance().createNode("context/multiple/MultipleContext.composite", new Contribution("c1", location));
+ NodeFactory factory = NodeFactory.newInstance();
+ Node node = factory.createNode(new File("src/main/resources/context/multiple/MultipleContext.composite").toURI().toURL().toString(),
+ new Contribution("TestContribution", new File("src/main/resources/context/multiple/").toURI().toURL().toString()));
node.start();
// Method 1: To access the Spring Application Context instance
diff --git a/java/sca/itest/implementation-spring/src/test/java/implementation/policies/CalculatorClient.java b/java/sca/itest/implementation-spring/src/test/java/implementation/policies/CalculatorClient.java
index 308faf155d..8b12dd7af7 100644
--- a/java/sca/itest/implementation-spring/src/test/java/implementation/policies/CalculatorClient.java
+++ b/java/sca/itest/implementation-spring/src/test/java/implementation/policies/CalculatorClient.java
@@ -19,10 +19,11 @@
package implementation.policies;
+import java.io.File;
+
import javax.security.auth.login.Configuration;
import org.apache.tuscany.sca.node.Client;
import org.apache.tuscany.sca.node.Contribution;
-import org.apache.tuscany.sca.node.ContributionLocationHelper;
import org.apache.tuscany.sca.node.Node;
import org.apache.tuscany.sca.node.NodeFactory;
import calculator.CalculatorService;
@@ -41,9 +42,10 @@ public class CalculatorClient {
.getResource("implementation/policies/CalculatorJass.config").toString());
}
- String location = ContributionLocationHelper.getContributionLocation("implementation/policies/ImplementationPolicies.composite");
- Node node = NodeFactory.newInstance().createNode("implementation/policies/ImplementationPolicies.composite", new Contribution("c1", location));
- node.start();
+ NodeFactory factory = NodeFactory.newInstance();
+ Node node = factory.createNode(new File("src/main/resources/implementation/policies/ImplementationPolicies.composite").toURI().toURL().toString(),
+ new Contribution("TestContribution", new File("src/main/resources/implementation/policies/").toURI().toURL().toString()));
+ node.start();
CalculatorService calculatorService =
((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
diff --git a/java/sca/itest/implementation-spring/src/test/java/implementation/policies/ImplementationPoliciesTestCase.java b/java/sca/itest/implementation-spring/src/test/java/implementation/policies/ImplementationPoliciesTestCase.java
index b8bb93e295..a44ae38d24 100644
--- a/java/sca/itest/implementation-spring/src/test/java/implementation/policies/ImplementationPoliciesTestCase.java
+++ b/java/sca/itest/implementation-spring/src/test/java/implementation/policies/ImplementationPoliciesTestCase.java
@@ -20,13 +20,10 @@ package implementation.policies;
import junit.framework.TestCase;
-import org.junit.Ignore;
-
/**
* Tests out the big bank service
*
*/
-@Ignore("TUSCANY-3027")
public class ImplementationPoliciesTestCase extends TestCase {
public void testServer() throws Exception {
diff --git a/java/sca/itest/implementation-spring/src/test/java/location/folder/SpringFolderLocationTestCase.java b/java/sca/itest/implementation-spring/src/test/java/location/folder/SpringFolderLocationTestCase.java
index 539074c101..d54f0544d8 100644
--- a/java/sca/itest/implementation-spring/src/test/java/location/folder/SpringFolderLocationTestCase.java
+++ b/java/sca/itest/implementation-spring/src/test/java/location/folder/SpringFolderLocationTestCase.java
@@ -37,5 +37,9 @@ import org.apache.tuscany.sca.itest.spring.AbstractHelloWorldTestCase;
*/
public class SpringFolderLocationTestCase extends AbstractHelloWorldTestCase {
// super class does it all getting composite based on this class name
+
+ public SpringFolderLocationTestCase() {
+ super("SpringFolderLocation.composite", "location/folder/");
+ }
}
diff --git a/java/sca/itest/implementation-spring/src/test/java/location/jar/SpringJarLocationTestCase.java b/java/sca/itest/implementation-spring/src/test/java/location/jar/SpringJarLocationTestCase.java
index 7694e493ef..71768f5a7b 100644
--- a/java/sca/itest/implementation-spring/src/test/java/location/jar/SpringJarLocationTestCase.java
+++ b/java/sca/itest/implementation-spring/src/test/java/location/jar/SpringJarLocationTestCase.java
@@ -37,5 +37,9 @@ import org.apache.tuscany.sca.itest.spring.AbstractHelloWorldTestCase;
*/
public class SpringJarLocationTestCase extends AbstractHelloWorldTestCase {
// super class does it all getting composite based on this class name
+
+ public SpringJarLocationTestCase() {
+ super("SpringJarLocation.composite", "location/jar/");
+ }
}
diff --git a/java/sca/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractHelloWorldTestCase.java b/java/sca/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractHelloWorldTestCase.java
index 634e3d34af..0c6f8d2e84 100644
--- a/java/sca/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractHelloWorldTestCase.java
+++ b/java/sca/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractHelloWorldTestCase.java
@@ -28,7 +28,11 @@ public abstract class AbstractHelloWorldTestCase extends AbstractSCATestCase<Hel
/**
* Calls the hello world service and checks that it gives the right response...
- */
+ */
+ public AbstractHelloWorldTestCase(String compositeName, String contributionLocation) {
+ super(compositeName, contributionLocation);
+ }
+
public void testHello() throws Exception {
assertEquals("Hello petra", service.sayHello("petra"));
}
diff --git a/java/sca/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractSCATestCase.java b/java/sca/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractSCATestCase.java
index fee7246439..73b151bf7a 100644
--- a/java/sca/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractSCATestCase.java
+++ b/java/sca/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractSCATestCase.java
@@ -19,7 +19,10 @@
package org.apache.tuscany.sca.itest.spring;
+import java.io.File;
import junit.framework.TestCase;
+import java.net.MalformedURLException;
+
import org.apache.tuscany.sca.node.Client;
import org.apache.tuscany.sca.node.Contribution;
import org.apache.tuscany.sca.node.ContributionLocationHelper;
@@ -30,12 +33,20 @@ public abstract class AbstractSCATestCase<T> extends TestCase {
protected Node node;
protected T service;
+ protected String compositeName;
+ protected String contributionLocation;
+ public AbstractSCATestCase(String compositeName, String contributionLocation) {
+ super();
+ this.compositeName = compositeName;
+ this.contributionLocation = contributionLocation;
+ }
+
@Override
protected void setUp() throws Exception {
NodeFactory factory = NodeFactory.newInstance();
- String location = ContributionLocationHelper.getContributionLocation(getCompositeName());
- node = factory.createNode(getCompositeName(), new Contribution("c1", location));
+ node = factory.createNode(new File("src/main/resources/" + contributionLocation + compositeName).toURI().toURL().toString(),
+ new Contribution("TestContribution", new File("src/main/resources/" + contributionLocation).toURI().toURL().toString()));
node.start();
service = ((Client)node).getService(getServiceClass(), "ClientComponent");
}
@@ -46,12 +57,4 @@ public abstract class AbstractSCATestCase<T> extends TestCase {
protected void tearDown() throws Exception {
node.stop();
}
-
- protected String getCompositeName() {
- String className = this.getClass().getName();
- String compositeName = className.substring(0, className.length() - 8).replace('.', '/') + ".composite";
- System.out.println("Using composite: " + compositeName);
- return compositeName;
- }
-
}
diff --git a/java/sca/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorldTestCase.java b/java/sca/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorldTestCase.java
index 4088691ccd..f28dace31a 100644
--- a/java/sca/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorldTestCase.java
+++ b/java/sca/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorldTestCase.java
@@ -28,4 +28,8 @@ package org.apache.tuscany.sca.itest.spring;
*/
public class SpringDelegationHelloWorldTestCase extends AbstractHelloWorldTestCase {
// super class does it all getting composite based on this class name
+
+ public SpringDelegationHelloWorldTestCase() {
+ super("SpringDelegationHelloWorld.composite", "org/apache/tuscany/sca/itest/spring/");
+ }
}
diff --git a/java/sca/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringHelloWorldTestCase.java b/java/sca/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringHelloWorldTestCase.java
index 840bf59b73..def30b3ea0 100644
--- a/java/sca/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringHelloWorldTestCase.java
+++ b/java/sca/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringHelloWorldTestCase.java
@@ -28,5 +28,9 @@ package org.apache.tuscany.sca.itest.spring;
*
*/
public class SpringHelloWorldTestCase extends AbstractHelloWorldTestCase {
- // super class does it all getting composite based on this class name
+
+ // super class does it all getting composite based on this class name
+ public SpringHelloWorldTestCase() {
+ super("SpringHelloWorld.composite", "org/apache/tuscany/sca/itest/spring/");
+ }
}
diff --git a/java/sca/itest/implementation-spring/src/test/java/sca/references/SpringExplicitReferenceTestCase.java b/java/sca/itest/implementation-spring/src/test/java/sca/references/SpringExplicitReferenceTestCase.java
index e7f21e26ec..0c2e1daa81 100644
--- a/java/sca/itest/implementation-spring/src/test/java/sca/references/SpringExplicitReferenceTestCase.java
+++ b/java/sca/itest/implementation-spring/src/test/java/sca/references/SpringExplicitReferenceTestCase.java
@@ -38,4 +38,8 @@ import org.apache.tuscany.sca.itest.spring.AbstractHelloWorldTestCase;
*/
public class SpringExplicitReferenceTestCase extends AbstractHelloWorldTestCase {
// super class does it all getting composite based on this class name
+
+ public SpringExplicitReferenceTestCase() {
+ super("SpringExplicitReference.composite", "sca/references/");
+ }
}
diff --git a/java/sca/itest/implementation-spring/src/test/java/sca/references/SpringImplicitReferenceTestCase.java b/java/sca/itest/implementation-spring/src/test/java/sca/references/SpringImplicitReferenceTestCase.java
index 587cd638b2..8d0c548899 100644
--- a/java/sca/itest/implementation-spring/src/test/java/sca/references/SpringImplicitReferenceTestCase.java
+++ b/java/sca/itest/implementation-spring/src/test/java/sca/references/SpringImplicitReferenceTestCase.java
@@ -39,6 +39,10 @@ import org.apache.tuscany.sca.itest.spring.AbstractHelloWorldTestCase;
*/
public class SpringImplicitReferenceTestCase extends AbstractHelloWorldTestCase {
// super class does it all getting composite based on this class name
+
+ public SpringImplicitReferenceTestCase() {
+ super("SpringImplicitReference.composite", "sca/references/");
+ }
}
diff --git a/java/sca/itest/implementation-spring/src/test/java/sca/services/SpringExplicitServiceTestCase.java b/java/sca/itest/implementation-spring/src/test/java/sca/services/SpringExplicitServiceTestCase.java
index 51efa58a7d..f4bd53876c 100644
--- a/java/sca/itest/implementation-spring/src/test/java/sca/services/SpringExplicitServiceTestCase.java
+++ b/java/sca/itest/implementation-spring/src/test/java/sca/services/SpringExplicitServiceTestCase.java
@@ -33,4 +33,8 @@ import org.apache.tuscany.sca.itest.spring.AbstractHelloWorldTestCase;
*/
public class SpringExplicitServiceTestCase extends AbstractHelloWorldTestCase {
// super class does it all getting composite based on this class name
+
+ public SpringExplicitServiceTestCase() {
+ super("SpringExplicitService.composite", "sca/services/");
+ }
}
diff --git a/java/sca/itest/implementation-spring/src/test/java/sca/services/SpringImplicitServiceTestCase.java b/java/sca/itest/implementation-spring/src/test/java/sca/services/SpringImplicitServiceTestCase.java
index f02ed963dd..0907985d7f 100644
--- a/java/sca/itest/implementation-spring/src/test/java/sca/services/SpringImplicitServiceTestCase.java
+++ b/java/sca/itest/implementation-spring/src/test/java/sca/services/SpringImplicitServiceTestCase.java
@@ -31,4 +31,8 @@ import org.apache.tuscany.sca.itest.spring.AbstractHelloWorldTestCase;
*/
public class SpringImplicitServiceTestCase extends AbstractHelloWorldTestCase {
// super class does it all getting composite based on this class name
+
+ public SpringImplicitServiceTestCase() {
+ super("SpringImplicitService.composite", "sca/services/");
+ }
}
diff --git a/java/sca/itest/implementation-spring/src/test/java/spring/annotations/CalculatorClient.java b/java/sca/itest/implementation-spring/src/test/java/spring/annotations/CalculatorClient.java
index def0bb9d5f..13b84c8c73 100644
--- a/java/sca/itest/implementation-spring/src/test/java/spring/annotations/CalculatorClient.java
+++ b/java/sca/itest/implementation-spring/src/test/java/spring/annotations/CalculatorClient.java
@@ -19,9 +19,10 @@
package spring.annotations;
+import java.io.File;
+
import org.apache.tuscany.sca.node.Client;
import org.apache.tuscany.sca.node.Contribution;
-import org.apache.tuscany.sca.node.ContributionLocationHelper;
import org.apache.tuscany.sca.node.Node;
import org.apache.tuscany.sca.node.NodeFactory;
import calculator.CalculatorService;
@@ -34,9 +35,10 @@ import calculator.CalculatorService;
public class CalculatorClient {
public static void main(String[] args) throws Exception {
- String location = ContributionLocationHelper.getContributionLocation("spring/annotations/Calculator.composite");
- Node node = NodeFactory.newInstance().createNode("spring/annotations/Calculator.composite", new Contribution("c1", location));
- node.start();
+ NodeFactory factory = NodeFactory.newInstance();
+ Node node = factory.createNode(new File("src/main/resources/spring/annotations/Calculator.composite").toURI().toURL().toString(),
+ new Contribution("TestContribution", new File("src/main/resources/spring/annotations/").toURI().toURL().toString()));
+ node.start();
CalculatorService calculatorService =
((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
@@ -45,14 +47,6 @@ public class CalculatorClient {
System.out.println("3 - 2=" + calculatorService.subtract(3, 2));
System.out.println("3 * 2=" + calculatorService.multiply(3, 2));
System.out.println("3 / 2=" + calculatorService.divide(3, 2));
-
- /*calculatorService =
- ((SCAClient)node).getService(CalculatorService.class, "AnotherCalculatorServiceComponent");
-
- System.out.println("3 + 2=" + calculatorService.add(3, 2));
- System.out.println("3 - 2=" + calculatorService.subtract(3, 2));
- System.out.println("3 * 2=" + calculatorService.multiply(3, 2));
- System.out.println("3 / 2=" + calculatorService.divide(3, 2));*/
node.stop();
System.out.println("Bye");