diff options
Diffstat (limited to 'java/sca/itest/recursive/src')
68 files changed, 0 insertions, 2693 deletions
diff --git a/java/sca/itest/recursive/src/main/java/circular/include/DemoClass.java b/java/sca/itest/recursive/src/main/java/circular/include/DemoClass.java deleted file mode 100644 index fe42911486..0000000000 --- a/java/sca/itest/recursive/src/main/java/circular/include/DemoClass.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package circular.include; - -public class DemoClass { - - public String demo() { - return "hello"; - } -} diff --git a/java/sca/itest/recursive/src/main/java/composite/CompositeClient.java b/java/sca/itest/recursive/src/main/java/composite/CompositeClient.java deleted file mode 100644 index 5edc305970..0000000000 --- a/java/sca/itest/recursive/src/main/java/composite/CompositeClient.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package composite; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * Simple client program that invokes the components that we wired together. - * - * @version $Rev$ $Date$ - */ -public class CompositeClient { - - public static void main(String[] args) throws Exception { - SCADomain domain = SCADomain.newInstance("OuterComposite.composite"); - - Source source = domain.getService(Source.class, "SourceComponent"); - - System.out.println("Main thread " + Thread.currentThread()); - source.clientMethod("Client.main"); - Thread.sleep(500); - - domain.close(); - } -} diff --git a/java/sca/itest/recursive/src/main/java/composite/Source.java b/java/sca/itest/recursive/src/main/java/composite/Source.java deleted file mode 100644 index d0efcc1df1..0000000000 --- a/java/sca/itest/recursive/src/main/java/composite/Source.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package composite; - -public interface Source { - - void clientMethod(String arg); -} diff --git a/java/sca/itest/recursive/src/main/java/composite/SourceCallback.java b/java/sca/itest/recursive/src/main/java/composite/SourceCallback.java deleted file mode 100644 index baa95a8e39..0000000000 --- a/java/sca/itest/recursive/src/main/java/composite/SourceCallback.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package composite; - -public interface SourceCallback { - - void receiveResult(String result); -} diff --git a/java/sca/itest/recursive/src/main/java/composite/SourceImpl.java b/java/sca/itest/recursive/src/main/java/composite/SourceImpl.java deleted file mode 100644 index 8e2b347604..0000000000 --- a/java/sca/itest/recursive/src/main/java/composite/SourceImpl.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package composite; - -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Scope; -import org.oasisopen.sca.annotation.Service; - - -@Service(Source.class) -@Scope("COMPOSITE") -public class SourceImpl implements Source, SourceCallback { - - private Target targetReference; - private Target targetReference2; - - @Reference - public void setTargetReference(Target target) { - this.targetReference = target; - } - - @Reference - public void setTargetReference2(Target target) { - this.targetReference2 = target; - } - - public void clientMethod(String arg) { - System.out.println("Source: " + arg + " -> Source.clientMethod"); - targetReference.someMethod(arg + " -> Source.clientMethod"); - - System.out.println("Source: " + arg + " => Source.clientMethod2"); - targetReference2.someMethod(arg + " => Source.clientMethod2"); - } - - public void receiveResult(String result) { - System.out.println("Work thread " + Thread.currentThread()); - System.out.println("Result: " + result); - } -} diff --git a/java/sca/itest/recursive/src/main/java/composite/Target.java b/java/sca/itest/recursive/src/main/java/composite/Target.java deleted file mode 100644 index 703e72fc10..0000000000 --- a/java/sca/itest/recursive/src/main/java/composite/Target.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package composite; - -import org.oasisopen.sca.annotation.Callback; -import org.oasisopen.sca.annotation.OneWay; - - -@Callback(SourceCallback.class) -public interface Target { - - @OneWay - void someMethod(String arg); -} diff --git a/java/sca/itest/recursive/src/main/java/composite/TargetImpl.java b/java/sca/itest/recursive/src/main/java/composite/TargetImpl.java deleted file mode 100644 index cd9a9746fa..0000000000 --- a/java/sca/itest/recursive/src/main/java/composite/TargetImpl.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package composite; - -import org.oasisopen.sca.annotation.Callback; -import org.oasisopen.sca.annotation.Scope; -import org.oasisopen.sca.annotation.Service; - - -@Service(Target.class) -@Scope("COMPOSITE") -public class TargetImpl implements Target { - - private SourceCallback sourceCallback; - - @Callback - public void setSourceCallback(SourceCallback sourceCallback) { - this.sourceCallback = sourceCallback; - } - - public void someMethod(String arg) { - System.out.println("Target: " + arg); - sourceCallback.receiveResult(arg + " -> Target.someMethod"); - } -} diff --git a/java/sca/itest/recursive/src/main/java/foo/A.java b/java/sca/itest/recursive/src/main/java/foo/A.java deleted file mode 100644 index 65bf41920e..0000000000 --- a/java/sca/itest/recursive/src/main/java/foo/A.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package foo; - -import org.oasisopen.sca.annotation.Service; - -@Service(I.class) -public class A implements I { - public String get(int i) { - return A.class.getName(); - } -} diff --git a/java/sca/itest/recursive/src/main/java/foo/B.java b/java/sca/itest/recursive/src/main/java/foo/B.java deleted file mode 100644 index ecc04aff4c..0000000000 --- a/java/sca/itest/recursive/src/main/java/foo/B.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package foo; - -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -@Service(I.class) -public class B implements I { - protected I i = null; - - @Reference(name = "i", required = true) - public void setC(I c) { - this.i = c; - } - - public String get(int i) { - return this.i.get(i); - } -} diff --git a/java/sca/itest/recursive/src/main/java/foo/I.java b/java/sca/itest/recursive/src/main/java/foo/I.java deleted file mode 100644 index f6d55baef3..0000000000 --- a/java/sca/itest/recursive/src/main/java/foo/I.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package foo; - -public interface I { - String get(int i); -} diff --git a/java/sca/itest/recursive/src/main/java/policy/Target.java b/java/sca/itest/recursive/src/main/java/policy/Target.java deleted file mode 100644 index 2366f6542a..0000000000 --- a/java/sca/itest/recursive/src/main/java/policy/Target.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package policy; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface Target { - String hello(String arg); -} diff --git a/java/sca/itest/recursive/src/main/java/policy/TargetClientImpl.java b/java/sca/itest/recursive/src/main/java/policy/TargetClientImpl.java deleted file mode 100644 index b2d59e925c..0000000000 --- a/java/sca/itest/recursive/src/main/java/policy/TargetClientImpl.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package policy; - -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -@Service(Target.class) -public class TargetClientImpl implements Target { - - @Reference - protected Target targetService; - - public String hello(String arg) { - return "Target: Hello " + targetService.hello(arg) + "!"; - } -} diff --git a/java/sca/itest/recursive/src/main/java/policy/TargetServiceImpl.java b/java/sca/itest/recursive/src/main/java/policy/TargetServiceImpl.java deleted file mode 100644 index 6f52dfb26e..0000000000 --- a/java/sca/itest/recursive/src/main/java/policy/TargetServiceImpl.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package policy; - -import org.oasisopen.sca.annotation.Service; - -@Service(Target.class) -public class TargetServiceImpl implements Target { - - public String hello(String arg) { - return "Target: Hello " + arg + "!"; - } -} diff --git a/java/sca/itest/recursive/src/main/java/sample/ComponentAImpl.java b/java/sca/itest/recursive/src/main/java/sample/ComponentAImpl.java deleted file mode 100644 index 458a7d28a3..0000000000 --- a/java/sca/itest/recursive/src/main/java/sample/ComponentAImpl.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package sample; - -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -/** - * @version $Rev$ $Date$ - */ -@Service(Service1.class) -public class ComponentAImpl implements Service1 { - - @Reference(name = "Reference1", required = false) - protected Service1 ref; - - public String track(String source) { - if (ref != null) { - return ref.track(source + "-->ComponentA"); - } - return source + "-->ComponentA"; - } - -} diff --git a/java/sca/itest/recursive/src/main/java/sample/ComponentCImpl.java b/java/sca/itest/recursive/src/main/java/sample/ComponentCImpl.java deleted file mode 100644 index f3b9fc014d..0000000000 --- a/java/sca/itest/recursive/src/main/java/sample/ComponentCImpl.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package sample; - -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -/** - * @version $Rev$ $Date$ - */ -@Service(Service1.class) -public class ComponentCImpl implements Service1 { - - @Reference(name = "Reference1", required = false) - protected Service1 ref; - - public String track(String source) { - if (ref != null) { - return ref.track(source + "-->ComponentC"); - } - return source + "-->ComponentC"; - } - -} diff --git a/java/sca/itest/recursive/src/main/java/sample/ComponentEImpl.java b/java/sca/itest/recursive/src/main/java/sample/ComponentEImpl.java deleted file mode 100644 index 445b622a72..0000000000 --- a/java/sca/itest/recursive/src/main/java/sample/ComponentEImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package sample; - -import org.oasisopen.sca.annotation.Property; -import org.oasisopen.sca.annotation.Reference; - -/** - * @version $Rev$ $Date$ - */ -public class ComponentEImpl implements Service1 { - @Property(name = "Property1") - protected String prefix; - - @Reference(name = "Reference1") - protected Service1 ref; - - public String track(String source) { - return ref.track(source + "-->ComponentE"); - } -} diff --git a/java/sca/itest/recursive/src/main/java/sample/ComponentFImpl.java b/java/sca/itest/recursive/src/main/java/sample/ComponentFImpl.java deleted file mode 100644 index e2de8f3dc5..0000000000 --- a/java/sca/itest/recursive/src/main/java/sample/ComponentFImpl.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package sample; - -import org.oasisopen.sca.annotation.Reference; - -/** - * @version $Rev$ $Date$ - */ -public class ComponentFImpl implements Service1 { - - private Service1 ref; - - public String track(String source) { - if (ref != null) { - return ref.track(source + "-->ComponentF"); - } else { - System.err.println("Reference1 is not wired..."); - return source + "-->ComponentF"; - } - } - - @Reference(name = "Reference1") - public void setComponentA(Service1 ref) { - this.ref = ref; - } - -} diff --git a/java/sca/itest/recursive/src/main/java/sample/Service1.java b/java/sca/itest/recursive/src/main/java/sample/Service1.java deleted file mode 100644 index 81bdce79f1..0000000000 --- a/java/sca/itest/recursive/src/main/java/sample/Service1.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package sample; - -/** - * @version $Rev$ $Date$ - */ -public interface Service1 { - String track(String source); -} diff --git a/java/sca/itest/recursive/src/main/java/test/Aggregator.java b/java/sca/itest/recursive/src/main/java/test/Aggregator.java deleted file mode 100644 index 88b3bed1b2..0000000000 --- a/java/sca/itest/recursive/src/main/java/test/Aggregator.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package test; - -/** - * @version $Rev$ $Date$ - */ -public interface Aggregator { - String getAggregatedData(); -} diff --git a/java/sca/itest/recursive/src/main/java/test/AggregatorImpl.java b/java/sca/itest/recursive/src/main/java/test/AggregatorImpl.java deleted file mode 100644 index 638219d431..0000000000 --- a/java/sca/itest/recursive/src/main/java/test/AggregatorImpl.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package test; - -import java.util.List; - -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -/** - * @version $Rev$ $Date$ - */ -@Service(Aggregator.class) -public class AggregatorImpl implements Aggregator { - - @Reference(name = "uniSource") - protected Source source; - - @Reference(name = "multiSource") - protected List<Source> sources; - - public String getAggregatedData() { - System.out.println("uniSource: " + source.getData()); - StringBuffer sb = new StringBuffer(); - int i = 0; - for (Source s : sources) { - if (i != 0) { - sb.append(", "); - } else { - sb.append("multiSource: "); - } - sb.append(s.getData()); - i++; - } - return sb.toString(); - } - -} diff --git a/java/sca/itest/recursive/src/main/java/test/InnerSourceImpl.java b/java/sca/itest/recursive/src/main/java/test/InnerSourceImpl.java deleted file mode 100644 index aae9aba587..0000000000 --- a/java/sca/itest/recursive/src/main/java/test/InnerSourceImpl.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package test; - -import org.oasisopen.sca.annotation.Service; - -/** - * @version $Rev$ $Date$ - */ -@Service(Source.class) -public class InnerSourceImpl implements Source { - - public String getData() { - return "InnerSource"; - } - -} diff --git a/java/sca/itest/recursive/src/main/java/test/OuterSourceImpl.java b/java/sca/itest/recursive/src/main/java/test/OuterSourceImpl.java deleted file mode 100644 index bd31498ccc..0000000000 --- a/java/sca/itest/recursive/src/main/java/test/OuterSourceImpl.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package test; - -import org.oasisopen.sca.annotation.Service; - -/** - * @version $Rev$ $Date$ - */ -@Service(Source.class) -public class OuterSourceImpl implements Source { - - public String getData() { - return "OuterSource"; - } - -} diff --git a/java/sca/itest/recursive/src/main/java/test/Source.java b/java/sca/itest/recursive/src/main/java/test/Source.java deleted file mode 100644 index bcad89bf4d..0000000000 --- a/java/sca/itest/recursive/src/main/java/test/Source.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package test; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * @version $Rev$ $Date$ - */ -@Remotable -public interface Source { - String getData(); -} diff --git a/java/sca/itest/recursive/src/main/java/test1/composite/Target.java b/java/sca/itest/recursive/src/main/java/test1/composite/Target.java deleted file mode 100644 index 4883e12f49..0000000000 --- a/java/sca/itest/recursive/src/main/java/test1/composite/Target.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package test1.composite; - -public interface Target { - String hello(String arg); -} diff --git a/java/sca/itest/recursive/src/main/java/test1/composite/TargetOne.java b/java/sca/itest/recursive/src/main/java/test1/composite/TargetOne.java deleted file mode 100644 index 831e3cbd7b..0000000000 --- a/java/sca/itest/recursive/src/main/java/test1/composite/TargetOne.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package test1.composite; - -import org.oasisopen.sca.annotation.Service; - -@Service(Target.class) -public class TargetOne implements Target { - - public String hello(String arg) { - return "TargetOne: Hello " + arg + "!"; - } -} diff --git a/java/sca/itest/recursive/src/main/java/test1/composite/TargetTwo.java b/java/sca/itest/recursive/src/main/java/test1/composite/TargetTwo.java deleted file mode 100644 index 8c32eca547..0000000000 --- a/java/sca/itest/recursive/src/main/java/test1/composite/TargetTwo.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package test1.composite; - -import org.oasisopen.sca.annotation.Service; - -@Service(Target.class) -public class TargetTwo implements Target { - - public String hello(String arg) { - return "TargetTwo: Hello " + arg + "!"; - } -} diff --git a/java/sca/itest/recursive/src/main/resources/AComposite.composite b/java/sca/itest/recursive/src/main/resources/AComposite.composite deleted file mode 100644 index 1b5dee8762..0000000000 --- a/java/sca/itest/recursive/src/main/resources/AComposite.composite +++ /dev/null @@ -1,30 +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. - --> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://sample" - xmlns:sample="http://sample" - name="AComposite"> - - <component name="AComponent"> - <implementation.composite name="sample:BComposite"/> - </component> - -</composite> - diff --git a/java/sca/itest/recursive/src/main/resources/BComposite.composite b/java/sca/itest/recursive/src/main/resources/BComposite.composite deleted file mode 100644 index 7d4588eba4..0000000000 --- a/java/sca/itest/recursive/src/main/resources/BComposite.composite +++ /dev/null @@ -1,45 +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. - --> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://sample" - xmlns:sample="http://sample" - name="BComposite"> - - <service name="BService" promote="BComponent"> - <interface.java interface="sample.C"/> - </service> - - <component name="BComponent"> - <implementation.composite name="sample:CComposite"/> - - <reference name="PromotedRefX" target="XComponent"/> - <reference name="PromotedRefY" target="YComponent"/> - </component> - - <component name="XComponent"> - <implementation.java class="sample.XImpl"/> - </component> - - <component name="YComponent"> - <implementation.java class="sample.YImpl"/> - </component> - -</composite> - diff --git a/java/sca/itest/recursive/src/main/resources/CComposite.composite b/java/sca/itest/recursive/src/main/resources/CComposite.composite deleted file mode 100644 index 6d7b4ec600..0000000000 --- a/java/sca/itest/recursive/src/main/resources/CComposite.composite +++ /dev/null @@ -1,44 +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. - --> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://sample" - xmlns:sample="http://sample" - name="CComposite"> - - <service name="CService" promote="CComponent"> - <interface.java interface="sample.C"/> - </service> - - <reference name="PromotedRefX" promote="CComponent/refX"> - <interface.java interface="sample.X"/> - </reference> - - <reference name="PromotedRefY" promote="CComponent/refY"> - <interface.java interface="sample.Y"/> - </reference> - - <component name="CComponent"> - <implementation.java class="sample.CImpl"/> - <reference name="refX"/> - <reference name="refY"/> - </component> - -</composite> - diff --git a/java/sca/itest/recursive/src/main/resources/Composite1.composite b/java/sca/itest/recursive/src/main/resources/Composite1.composite deleted file mode 100644 index 56fd7c621f..0000000000 --- a/java/sca/itest/recursive/src/main/resources/Composite1.composite +++ /dev/null @@ -1,42 +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. - --> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://sample" - xmlns:sample="http://sample" - name="Composite1"> - - <component name="ComponentA"> - <implementation.java class="sample.ComponentAImpl"/> - </component> - - <component name="ComponentB"> - <!-- Implemented by Composite3 --> - <implementation.composite name="sample:Composite3"/> - - <!-- Wired to ComponentA --> - <reference name="Reference1" target="ComponentA"/> - - <property name="Property1">ABC</property> - </component> - - <!-- ComponentB.Service1 is promoted --> - <service name="Service1" promote="ComponentB/Service1" /> - -</composite> diff --git a/java/sca/itest/recursive/src/main/resources/Composite2.composite b/java/sca/itest/recursive/src/main/resources/Composite2.composite deleted file mode 100644 index 54f10673a4..0000000000 --- a/java/sca/itest/recursive/src/main/resources/Composite2.composite +++ /dev/null @@ -1,43 +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. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://sample" - xmlns:sample="http://sample" - name="Composite2"> - - <component name="ComponentC"> - <implementation.java class="sample.ComponentCImpl" /> - - <!-- Wired to ComponentD.Service1 --> - <reference name="Reference1" target="ComponentD/Service1" /> - </component> - - <component name="ComponentD"> - <!-- Implemented by Composite3 --> - <implementation.composite name="sample:Composite3" /> - - <!-- The property value is "XYZ" --> - <property name="Property1">XYZ</property> - </component> - - <!-- ComponentD.Reference1 is promoted --> - <reference name="Reference1" promote="ComponentD/Reference1" /> - -</composite> diff --git a/java/sca/itest/recursive/src/main/resources/Composite3.composite b/java/sca/itest/recursive/src/main/resources/Composite3.composite deleted file mode 100644 index 040653493f..0000000000 --- a/java/sca/itest/recursive/src/main/resources/Composite3.composite +++ /dev/null @@ -1,48 +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. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://sample" - xmlns:sample="http://sample" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - name="Composite3"> - - <component name="ComponentE"> - <implementation.java class="sample.ComponentEImpl" /> - <reference name="Reference1" target="ComponentF/Service1" /> - - <!-- The property is from the composite Property1 --> - <property name="Property1" source="$Property1" /> - </component> - - <component name="ComponentF"> - <implementation.java class="sample.ComponentFImpl" /> - </component> - - <service name="Service1" promote="ComponentE/Service1" /> - - <reference name="Reference1" promote="ComponentF/Reference1"> - <!-- - <binding.sca /> - --> - </reference> - - <property name="Property1" type="xsd:string">123</property> - -</composite> diff --git a/java/sca/itest/recursive/src/main/resources/Demo1Composite.composite b/java/sca/itest/recursive/src/main/resources/Demo1Composite.composite deleted file mode 100644 index 6b2a964b9b..0000000000 --- a/java/sca/itest/recursive/src/main/resources/Demo1Composite.composite +++ /dev/null @@ -1,27 +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.
--->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
- targetNamespace="http://sample" xmlns:sample="http://sample" name="Demo1Composite"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0">
- <include name="sample:Demo2Composite" />
- <component name="Demo1Component">
- <implementation.java class="circular.include.DemoClass" />
- </component>
-</composite>
diff --git a/java/sca/itest/recursive/src/main/resources/Demo2Composite.composite b/java/sca/itest/recursive/src/main/resources/Demo2Composite.composite deleted file mode 100644 index 6b8c0a348e..0000000000 --- a/java/sca/itest/recursive/src/main/resources/Demo2Composite.composite +++ /dev/null @@ -1,28 +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.
--->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
- targetNamespace="http://sample" xmlns:sample="http://sample" name="Demo2Composite"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0">
- <include name="sample:Demo1Composite" />
- <component name="Demo2Component">
- <implementation.java class="circular.include.DemoClass" />
- </component>
-</composite>
-
diff --git a/java/sca/itest/recursive/src/main/resources/Inner.composite b/java/sca/itest/recursive/src/main/resources/Inner.composite deleted file mode 100644 index 398ebdf6e2..0000000000 --- a/java/sca/itest/recursive/src/main/resources/Inner.composite +++ /dev/null @@ -1,45 +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.
- -->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
- targetNamespace="http://test"
- xmlns:sample="http://test"
- name="Inner">
-
- <component name="Aggregator">
- <implementation.java class="test.AggregatorImpl"/>
- <reference name="uniSource" target="InnerSource/Source"/>
- <reference name="multiSource" target="InnerSource/Source"/>
- </component>
-
- <component name="InnerSource">
- <implementation.java class="test.InnerSourceImpl"/>
- </component>
-
- <reference name="uniSource" promote="Aggregator/uniSource">
- <binding.sca/>
- </reference>
-
- <reference name="multiSource" promote="Aggregator/multiSource">
- <binding.sca/>
- </reference>
-
- <service name="aggregator" promote="Aggregator"/>
-
-</composite>
diff --git a/java/sca/itest/recursive/src/main/resources/InnerComposite.composite b/java/sca/itest/recursive/src/main/resources/InnerComposite.composite deleted file mode 100644 index 3376ac8ff5..0000000000 --- a/java/sca/itest/recursive/src/main/resources/InnerComposite.composite +++ /dev/null @@ -1,41 +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. - --> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://sample" - xmlns:sample="http://sample" - name="InnerComposite"> - - <service name="InnerSourceService" promote="InnerSourceComponent"> - <interface.java interface="composite.Source"/> - </service> - - <component name="InnerSourceComponent"> - <implementation.java class="composite.SourceImpl"/> - </component> - - <reference name="targetComponentRef" promote="InnerSourceComponent/targetReference"> - <interface.java interface="composite.Target" callbackInterface="composite.SourceCallback"/> - </reference> - - <reference name="targetComponentRef2" promote="InnerSourceComponent/targetReference2"> - <interface.java interface="composite.Target" callbackInterface="composite.SourceCallback"/> - </reference> - -</composite> diff --git a/java/sca/itest/recursive/src/main/resources/InnerComposite2.composite b/java/sca/itest/recursive/src/main/resources/InnerComposite2.composite deleted file mode 100644 index c9eff4fa9d..0000000000 --- a/java/sca/itest/recursive/src/main/resources/InnerComposite2.composite +++ /dev/null @@ -1,33 +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. - --> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://sample" - xmlns:sample="http://sample" - name="InnerComposite2"> - - <service name="InnerTargetService" promote="InnerTargetComponent"> - <interface.java interface="composite.Target" callbackInterface="composite.SourceCallback"/> - </service> - - <component name="InnerTargetComponent"> - <implementation.java class="composite.TargetImpl"/> - </component> - -</composite> diff --git a/java/sca/itest/recursive/src/main/resources/META-INF/sca-contribution.xml b/java/sca/itest/recursive/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 289b92a3f2..0000000000 --- a/java/sca/itest/recursive/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +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.
--->
-<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
- targetNamespace="http://sample"
- xmlns:sample="http://sample">
- <deployable composite="sample:OuterComposite"/>
-</contribution>
\ No newline at end of file diff --git a/java/sca/itest/recursive/src/main/resources/Outer.composite b/java/sca/itest/recursive/src/main/resources/Outer.composite deleted file mode 100644 index 987990d854..0000000000 --- a/java/sca/itest/recursive/src/main/resources/Outer.composite +++ /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.
- -->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
- targetNamespace="http://test"
- xmlns:test="http://test"
- name="Outer">
-
- <component name="OuterSource">
- <implementation.java class="test.OuterSourceImpl"/>
- </component>
-
- <component name="Inner">
- <!-- Implemented by Composite3 -->
- <implementation.composite name="test:Inner"/>
-
- <reference name="uniSource" target="OuterSource"/>
-
- <reference name="multiSource" target="OuterSource"/>
-
- </component>
-
-</composite>
diff --git a/java/sca/itest/recursive/src/main/resources/OuterComposite.composite b/java/sca/itest/recursive/src/main/resources/OuterComposite.composite deleted file mode 100644 index cb1c1e13d4..0000000000 --- a/java/sca/itest/recursive/src/main/resources/OuterComposite.composite +++ /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. - --> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://sample" - xmlns:sample="http://sample" - name="OuterComposite"> - - <component name="SourceComponent"> - <implementation.composite name="sample:InnerComposite"/> - <reference name="targetComponentRef" target="TargetComponent"/> - <reference name="targetComponentRef2" target="TargetComponent2/InnerTargetService"/> - </component> - - <component name="TargetComponent"> - <implementation.java class="composite.TargetImpl"/> - </component> - - <component name="TargetComponent2"> - <implementation.composite name="sample:InnerComposite2"/> - </component> - -</composite> diff --git a/java/sca/itest/recursive/src/main/resources/foo/foo.png b/java/sca/itest/recursive/src/main/resources/foo/foo.png Binary files differdeleted file mode 100644 index 0f2ec78aaf..0000000000 --- a/java/sca/itest/recursive/src/main/resources/foo/foo.png +++ /dev/null diff --git a/java/sca/itest/recursive/src/main/resources/foo/o1.composite b/java/sca/itest/recursive/src/main/resources/foo/o1.composite deleted file mode 100644 index 1d31c2f424..0000000000 --- a/java/sca/itest/recursive/src/main/resources/foo/o1.composite +++ /dev/null @@ -1,31 +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.
--->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" targetNamespace="http://bar" xmlns:bar="http://bar"
- name="O1Composite">
-
- <service name="O1Service" promote="AComponent">
- <interface.java interface="foo.I" />
- </service>
-
- <component name="AComponent">
- <implementation.java class="foo.A" />
- </component>
-
-</composite>
\ No newline at end of file diff --git a/java/sca/itest/recursive/src/main/resources/foo/o2.composite b/java/sca/itest/recursive/src/main/resources/foo/o2.composite deleted file mode 100644 index 4f21c21860..0000000000 --- a/java/sca/itest/recursive/src/main/resources/foo/o2.composite +++ /dev/null @@ -1,31 +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.
--->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" targetNamespace="http://bar" xmlns:bar="http://bar"
- name="O2Composite">
-
- <service name="O2Service" promote="O1Component/O1Service">
- <interface.java interface="foo.I" />
- </service>
-
- <component name="O1Component">
- <implementation.composite name="bar:O1Composite" />
- </component>
-
-</composite>
\ No newline at end of file diff --git a/java/sca/itest/recursive/src/main/resources/foo/o3.composite b/java/sca/itest/recursive/src/main/resources/foo/o3.composite deleted file mode 100644 index 72c732c03e..0000000000 --- a/java/sca/itest/recursive/src/main/resources/foo/o3.composite +++ /dev/null @@ -1,35 +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.
--->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" targetNamespace="http://bar" xmlns:bar="http://bar"
- name="O3Composite">
-
- <service name="O3Service" promote="BComponent">
- <interface.java interface="foo.I" />
- </service>
-
- <component name="BComponent">
- <implementation.java class="foo.B" />
- </component>
-
- <reference name="O3Reference" promote="BComponent/i">
- <interface.java interface="foo.I" />
- </reference>
-
-</composite>
\ No newline at end of file diff --git a/java/sca/itest/recursive/src/main/resources/foo/o4.composite b/java/sca/itest/recursive/src/main/resources/foo/o4.composite deleted file mode 100644 index f8f07eed09..0000000000 --- a/java/sca/itest/recursive/src/main/resources/foo/o4.composite +++ /dev/null @@ -1,37 +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.
--->
-
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" targetNamespace="http://bar" xmlns:bar="http://bar"
- name="O4Composite">
-
- <service name="O4Service" promote="O3Component/O3Service">
- <interface.java interface="foo.I" />
- </service>
-
- <component name="O3Component">
- <implementation.composite name="bar:O3Composite" />
- <reference name="O3Reference" target="O2Component/O2Service" />
- </component>
-
- <component name="O2Component">
- <implementation.composite name="bar:O2Composite" />
- </component>
-
-</composite>
\ No newline at end of file diff --git a/java/sca/itest/recursive/src/main/resources/policy/PolicyInnerComposite.composite b/java/sca/itest/recursive/src/main/resources/policy/PolicyInnerComposite.composite deleted file mode 100644 index 4a6df023b8..0000000000 --- a/java/sca/itest/recursive/src/main/resources/policy/PolicyInnerComposite.composite +++ /dev/null @@ -1,32 +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.
- -->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
- targetNamespace="http://policy"
- xmlns:policy="http://policy"
- name="PolicyInnerComposite">
-
- <service name="TargetService" promote="TargetServiceComponent">
- </service>
-
- <component name="TargetServiceComponent">
- <implementation.java class="policy.TargetServiceImpl"/>
- </component>
-
-</composite>
diff --git a/java/sca/itest/recursive/src/main/resources/policy/PolicyOuterComposite.composite b/java/sca/itest/recursive/src/main/resources/policy/PolicyOuterComposite.composite deleted file mode 100644 index 25007aebb2..0000000000 --- a/java/sca/itest/recursive/src/main/resources/policy/PolicyOuterComposite.composite +++ /dev/null @@ -1,35 +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. - --> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://policy" - xmlns:policy="http://policy" - requires="policy:TestIntent_1" - name="PolicyOuterComposite"> - - <component name="TargetClientComponent"> - <implementation.java class="policy.TargetClientImpl"/> - <reference name="targetService" target="OuterTargetServiceComponent"/> - </component> - - <component name="OuterTargetServiceComponent"> - <implementation.composite name="policy:PolicyInnerComposite"/> - </component> - -</composite> diff --git a/java/sca/itest/recursive/src/main/resources/policy/definitions.xml b/java/sca/itest/recursive/src/main/resources/policy/definitions.xml deleted file mode 100644 index 957028e3bd..0000000000 --- a/java/sca/itest/recursive/src/main/resources/policy/definitions.xml +++ /dev/null @@ -1,46 +0,0 @@ -<?xml version="1.0" encoding="ASCII"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<definitions xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://policy" - xmlns:sca="http://www.osoa.org/xmlns/sca/1.0" - xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0" - xmlns:ip="http://policy" > - - <!-- Policy Intents --> - <sca:intent name="TestIntent_1" constrains="sca:implementation"> - <description>Test Intent One</description> - </sca:intent> - - <!-- Policy Sets --> - <sca:policySet name="TestPolicySet_1_composite" - provides="ip:TestIntent_1" - appliesTo="sca:implementation.composite" - xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"> - <wsp:Policy /> - </sca:policySet> - - <sca:policySet name="TestPolicySet_1_java" - provides="ip:TestIntent_1" - appliesTo="sca:implementation.java" - xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"> - <wsp:Policy /> - </sca:policySet> - -</definitions>
\ No newline at end of file diff --git a/java/sca/itest/recursive/src/main/resources/test1/InnerComposite.composite b/java/sca/itest/recursive/src/main/resources/test1/InnerComposite.composite deleted file mode 100644 index 177fa10550..0000000000 --- a/java/sca/itest/recursive/src/main/resources/test1/InnerComposite.composite +++ /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. - --> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://sample1" - xmlns:sample1="http://sample1" - name="InnerComposite"> - - <service name="Service_One" promote="ComponentOne"> - <interface.java interface="test1.composite.Target"/> - </service> - <service name="Service_Two" promote="ComponentTwo"> - <interface.java interface="test1.composite.Target"/> - </service> - - <component name="ComponentOne"> - <implementation.java class="test1.composite.TargetOne"/> - </component> - <component name="ComponentTwo"> - <implementation.java class="test1.composite.TargetTwo"/> - </component> - -</composite> diff --git a/java/sca/itest/recursive/src/main/resources/test1/OuterComposite.composite b/java/sca/itest/recursive/src/main/resources/test1/OuterComposite.composite deleted file mode 100644 index d05a67f45f..0000000000 --- a/java/sca/itest/recursive/src/main/resources/test1/OuterComposite.composite +++ /dev/null @@ -1,27 +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.
- -->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
- targetNamespace="http://sample1"
- xmlns:sample1="http://sample1"
- name="OuterComposite">
- <component name="Test1TargetComponent">
- <implementation.composite name="sample1:InnerComposite"/>
- </component>
-</composite>
diff --git a/java/sca/itest/recursive/src/test/java/circular/include/CircularIncludeTestCase.java b/java/sca/itest/recursive/src/test/java/circular/include/CircularIncludeTestCase.java deleted file mode 100644 index 1f7c35dd91..0000000000 --- a/java/sca/itest/recursive/src/test/java/circular/include/CircularIncludeTestCase.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package circular.include; - -import junit.framework.Assert; - -import org.apache.tuscany.sca.host.embedded.SCADomain; -import org.junit.Test; - -public class CircularIncludeTestCase { - - @Test - public void testCyclicInclude() { - SCADomain scaDomain = SCADomain.newInstance("Demo1Composite.composite"); - - DemoClass demoService = scaDomain.getService(DemoClass.class, "Demo1Component"); - String demo = demoService.demo(); - Assert.assertEquals("hello", demo); - scaDomain.close(); - } - -} diff --git a/java/sca/itest/recursive/src/test/java/composite/CompositeTestCase.java b/java/sca/itest/recursive/src/test/java/composite/CompositeTestCase.java deleted file mode 100644 index 5482e47463..0000000000 --- a/java/sca/itest/recursive/src/test/java/composite/CompositeTestCase.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package composite; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -public class CompositeTestCase extends TestCase { - - private SCADomain domain; - private Source source; - - @Override - protected void setUp() throws Exception { - domain = SCADomain.newInstance("OuterComposite.composite"); - source = domain.getService(Source.class, "SourceComponent"); - } - - @Override - protected void tearDown() throws Exception { - domain.close(); - } - - public void test() throws Exception { - try { - System.out.println("Main thread " + Thread.currentThread()); - source.clientMethod("Client.main"); - System.out.println("Sleeping ..."); - Thread.sleep(1000); - } catch (Throwable t) { - t.printStackTrace(); - } - } -} diff --git a/java/sca/itest/recursive/src/test/java/composite/LocateServiceEmbeddedSCADomainTestCase.java b/java/sca/itest/recursive/src/test/java/composite/LocateServiceEmbeddedSCADomainTestCase.java deleted file mode 100644 index fb9872378d..0000000000 --- a/java/sca/itest/recursive/src/test/java/composite/LocateServiceEmbeddedSCADomainTestCase.java +++ /dev/null @@ -1,113 +0,0 @@ -/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package composite;
-
-import java.io.File;
-import java.net.URL;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.assembly.Composite;
-import org.apache.tuscany.sca.contribution.Contribution;
-import org.apache.tuscany.sca.contribution.service.ContributionService;
-import org.apache.tuscany.sca.host.embedded.impl.EmbeddedSCADomain;
-
-public class LocateServiceEmbeddedSCADomainTestCase extends TestCase {
- private ClassLoader cl;
- private EmbeddedSCADomain domain;
- private Contribution contribution;
-
- @Override
- protected void setUp() throws Exception {
- // Create a test embedded SCA domain
- cl = getClass().getClassLoader();
- domain = new EmbeddedSCADomain(cl, "http://localhost");
-
- // Start the domain
- domain.start();
-
- // Contribute the SCA contribution
- ContributionService contributionService = domain.getContributionService();
-
- File contribLocation = new File("./target/classes/");
- URL contributionURL = contribLocation.toURL();
- contribution = contributionService.contribute("http://contribution", contributionURL, false);
- for (Composite deployable : contribution.getDeployables()) {
- domain.getDomainComposite().getIncludes().add(deployable);
- domain.buildComposite(deployable);
- }
-
- // Start Components from my composite
- for (Composite deployable : contribution.getDeployables() ) {
- domain.getCompositeActivator().activate(deployable);
- domain.getCompositeActivator().start(deployable);
- }
- }
-
- public void testValidLocateService() throws Exception {
- Source source;
- try {
- source = domain.getService(Source.class, "SourceComponent");
- assertNotNull(source);
- } catch (Throwable t) {
- fail("Could not locate service");
- }
- }
-
- public void testInvalidLocateService() throws Exception {
- Source source;
- try {
- source = domain.getService(Source.class, "SourceComponentXXX");
- // The source proxy can be created for the remote target but it will throw exception when a method is invoked
- source.clientMethod("ABC");
- fail("Expected to generate org.oasisopen.sca.ServiceRuntimeException but did not when invoking service with async");
- } catch (org.oasisopen.sca.ServiceRuntimeException e) {
- // expected.
- }
- }
-
- public void testValidRecursiveLocateService() throws Exception {
- Source source;
- try {
- source = domain.getService(Source.class, "SourceComponent/InnerSourceService");
- assertNotNull(source);
- } catch (Throwable t) {
- fail("Could not locate service");
- }
- }
-
- @Override
- public void tearDown() throws Exception {
- ContributionService contributionService = domain.getContributionService();
-
- // Remove the contribution from the in-memory repository
- contributionService.remove("http://contribution");
-
- // Stop Components from my composite
- for (Composite deployable : contribution.getDeployables() ) {
- domain.getCompositeActivator().stop(deployable);
- domain.getCompositeActivator().deactivate(deployable);
- }
-
- domain.stop();
- domain.close();
- }
-
-}
diff --git a/java/sca/itest/recursive/src/test/java/composite/LocateServiceSCADomainTestCase.java b/java/sca/itest/recursive/src/test/java/composite/LocateServiceSCADomainTestCase.java deleted file mode 100644 index 171f181438..0000000000 --- a/java/sca/itest/recursive/src/test/java/composite/LocateServiceSCADomainTestCase.java +++ /dev/null @@ -1,73 +0,0 @@ -/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package composite;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-
-public class LocateServiceSCADomainTestCase extends TestCase {
-
- private SCADomain domain;
-
-
- @Override
- protected void setUp() throws Exception {
- domain = SCADomain.newInstance("OuterComposite.composite");
- }
-
- @Override
- protected void tearDown() throws Exception {
- domain.close();
- }
-
- public void testValidLocateService() throws Exception {
- Source source;
- try {
- source = domain.getService(Source.class, "SourceComponent");
- assertNotNull(source);
- } catch (Throwable t) {
- fail("Could not locate service");
- }
- }
-
- public void testInvalidLocateService() throws Exception {
- Source source;
- try {
- source = domain.getService(Source.class, "SourceComponentXXX");
- // The source proxy can be created for the remote target but it will throw exception when a method is invoked
- source.clientMethod("ABC");
- fail("Expected to generate org.oasisopen.sca.ServiceRuntimeException but did not when invoking service with async");
- } catch (org.oasisopen.sca.ServiceRuntimeException e) {
- // expected.
- }
- }
-
- public void testValidRecursiveLocateService() throws Exception {
- Source source;
- try {
- source = domain.getService(Source.class, "SourceComponent/InnerSourceService");
- assertNotNull(source);
- } catch (Throwable t) {
- fail("Could not locate service");
- }
- }
-
-}
diff --git a/java/sca/itest/recursive/src/test/java/foo/O2TestCase.java b/java/sca/itest/recursive/src/test/java/foo/O2TestCase.java deleted file mode 100644 index d617ec8592..0000000000 --- a/java/sca/itest/recursive/src/test/java/foo/O2TestCase.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package foo; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -public class O2TestCase extends TestCase { - - public void testGet() throws Exception { - SCADomain sca = SCADomain.newInstance("foo/o2.composite"); - I i = sca.getService(I.class, "O1Component"); - assertEquals("foo.A", i.get(0)); - } -} diff --git a/java/sca/itest/recursive/src/test/java/foo/O4TestCase.java b/java/sca/itest/recursive/src/test/java/foo/O4TestCase.java deleted file mode 100644 index 15626c75ac..0000000000 --- a/java/sca/itest/recursive/src/test/java/foo/O4TestCase.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package foo; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -public class O4TestCase extends TestCase { - - public void testO3Component() throws Exception { - SCADomain sca = SCADomain.newInstance("foo/o4.composite"); - I i = sca.getService(I.class, "O3Component"); - assertEquals("foo.A", i.get(0)); - } - - public void testO2Component() throws Exception { - SCADomain sca = SCADomain.newInstance("foo/o4.composite"); - I i = sca.getService(I.class, "O2Component"); - assertEquals("foo.A", i.get(0)); - } - -} diff --git a/java/sca/itest/recursive/src/test/java/policy/PolicyTestCase.java b/java/sca/itest/recursive/src/test/java/policy/PolicyTestCase.java deleted file mode 100644 index c9cc84f7d4..0000000000 --- a/java/sca/itest/recursive/src/test/java/policy/PolicyTestCase.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package policy; - -import junit.framework.Assert; - -import org.apache.tuscany.sca.assembly.Component; -import org.apache.tuscany.sca.assembly.impl.CompositeImpl; -import org.apache.tuscany.sca.host.embedded.SCADomain; -import org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -public class PolicyTestCase { - - private SCADomain domain; - private Target targetClient; - - @Before - public void setUp() throws Exception { - domain = SCADomain.newInstance("policy/PolicyOuterComposite.composite"); - targetClient = domain.getService(Target.class, "TargetClientComponent"); - } - - @After - public void tearDown() throws Exception { - domain.close(); - } - - @Test - public void test() throws Exception { - try { - //Check that the implementation policy sets don't flow down to the components - //implementations that are themselves composites (implementation.composite) - Component outerComponent = ((DefaultSCADomain)domain).getComponent("OuterTargetServiceComponent"); - - Assert.assertEquals(0, outerComponent.getPolicySets().size()); - - for (Component component :((CompositeImpl)outerComponent.getImplementation()).getComponents()){ - Assert.assertEquals(0, component.getPolicySets().size()); - } - - // debugging - String result = targetClient.hello("Fred"); - - System.out.println(result); - } catch (Throwable t) { - t.printStackTrace(); - } - } -} diff --git a/java/sca/itest/recursive/src/test/java/sample/C.java b/java/sca/itest/recursive/src/test/java/sample/C.java deleted file mode 100644 index bf8391348b..0000000000 --- a/java/sca/itest/recursive/src/test/java/sample/C.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package sample; - -/** - * Simple Service - */ -public interface C { - - /** - * Sample operation - * - * @return A String - */ - String cOp(); -} diff --git a/java/sca/itest/recursive/src/test/java/sample/CImpl.java b/java/sca/itest/recursive/src/test/java/sample/CImpl.java deleted file mode 100644 index 98610e32a6..0000000000 --- a/java/sca/itest/recursive/src/test/java/sample/CImpl.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package sample; - -import junit.framework.Assert; - -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -/** - * Implementation of a simple service - */ -@Service(C.class) -public class CImpl implements C { - - /** - * Reference to X - */ - private X xRef; - - /** - * Reference to Y - */ - private Y yRef; - - /** - * Setter for refX - * - * @param x Reference to X - */ - @Reference(name="refX") - protected void setX(X x) - { - System.out.println("Setting X on CImpl to " + x); - xRef = x; - } - - /** - * Setter for refY - * - * @param y Reference to Y - */ - @Reference(name="refY") - protected void setY(Y y) - { - System.out.println("Setting Y on CImpl to " + y); - yRef = y; - } - - /** - * Simple operation that uses the injected references to X and Y - * - * @return "C:cOp() - xResult = " + xRef.xOP() + " yResult = " + yRef.yOp(); - */ - public String cOp() { - Assert.assertNotNull(xRef); - Assert.assertNotNull(yRef); - - String xResult = xRef.xOp(); - String yResult = yRef.yOp(); - - return "C:cOp() - xResult = " + xResult + " yResult = " + yResult; - } -} diff --git a/java/sca/itest/recursive/src/test/java/sample/NestedTestCase.java b/java/sca/itest/recursive/src/test/java/sample/NestedTestCase.java deleted file mode 100644 index fc5d251460..0000000000 --- a/java/sca/itest/recursive/src/test/java/sample/NestedTestCase.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package sample; - -import junit.framework.Assert; -import junit.framework.TestCase; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - - -/** - * Test for implementation.composite using implementation.composite - */ -public class NestedTestCase extends TestCase { - - /** - * Reference to the domain - */ - private SCADomain domain; - - /** - * Tear down the domain - */ - @Override - protected void tearDown() throws Exception { - if (domain != null) { - domain.close(); - } - } - - /** - * This tests having: - * - * AComponent -> implementation.composite(BComposite) - * BComposite -> implementation.composite(CComposite) - * - * This test fails. - * - * @throws Exception Failed - */ - public void testAComponent() throws Exception { - domain = SCADomain.newInstance("AComposite.composite"); - - System.out.println("Deployed names = " + domain.getComponentManager().getComponentNames()); - - C c = domain.getService(C.class, "AComponent"); - - String result = c.cOp(); - System.out.println("Method call returned [" + result + "]"); - Assert.assertNotNull(result); - Assert.assertTrue(result.indexOf("C:cOp()") != -1); - Assert.assertTrue(result.indexOf("X:xOp()") != -1); - Assert.assertTrue(result.indexOf("Y:yOp()") != -1); - } - - - /** - * This tests having: - * - * BComposite -> implementation.composite(CComposite) - * - * This test works. - * - * @throws Exception Failed - */ - public void testBComponent() throws Exception { - domain = SCADomain.newInstance("BComposite.composite"); - - System.out.println("Deployed names = " + domain.getComponentManager().getComponentNames()); - - C c = domain.getService(C.class, "BComponent"); - - String result = c.cOp(); - System.out.println("Method call returned [" + result + "]"); - Assert.assertNotNull(result); - Assert.assertTrue(result.indexOf("C:cOp()") != -1); - Assert.assertTrue(result.indexOf("X:xOp()") != -1); - Assert.assertTrue(result.indexOf("Y:yOp()") != -1); - } -} diff --git a/java/sca/itest/recursive/src/test/java/sample/RecursiveCompositeTestCaseFIXME.java b/java/sca/itest/recursive/src/test/java/sample/RecursiveCompositeTestCaseFIXME.java deleted file mode 100644 index a543add69b..0000000000 --- a/java/sca/itest/recursive/src/test/java/sample/RecursiveCompositeTestCaseFIXME.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package sample; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -//FIXME Fix this test case -public class RecursiveCompositeTestCaseFIXME extends TestCase { - - private SCADomain domain; - private Service1 tracker, tracker2; - - @Override - protected void setUp() throws Exception { - domain = SCADomain.newInstance("http://localhost", "/", "Composite1.composite", "Composite2.composite"); - tracker = domain.getService(Service1.class, "ComponentC"); - tracker2 = domain.getService(Service1.class, "ComponentB"); - - } - - @Override - protected void tearDown() throws Exception { - domain.close(); - } - - public void test() throws Exception { - try { - System.out.println("Main thread " + Thread.currentThread()); - System.out.println(tracker.track("Client")); - System.out.println(tracker2.track("Client")); - } catch (Throwable t) { - t.printStackTrace(); - } - } -} diff --git a/java/sca/itest/recursive/src/test/java/sample/X.java b/java/sca/itest/recursive/src/test/java/sample/X.java deleted file mode 100644 index e3a9335068..0000000000 --- a/java/sca/itest/recursive/src/test/java/sample/X.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package sample; - -/** - * Simple Service - */ -public interface X { - - /** - * Simple Operation - * - * @return A String - */ - String xOp(); -} diff --git a/java/sca/itest/recursive/src/test/java/sample/XImpl.java b/java/sca/itest/recursive/src/test/java/sample/XImpl.java deleted file mode 100644 index 7f80dfccb2..0000000000 --- a/java/sca/itest/recursive/src/test/java/sample/XImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package sample; - -import org.oasisopen.sca.annotation.Service; - -/** - * Implementation of a simple service - */ -@Service(X.class) -public class XImpl implements X { - - /** - * Simple operation - * - * @return "X:xOp()" - */ - public String xOp() { - return "X:xOp()"; - } -} diff --git a/java/sca/itest/recursive/src/test/java/sample/Y.java b/java/sca/itest/recursive/src/test/java/sample/Y.java deleted file mode 100644 index c15a4f635a..0000000000 --- a/java/sca/itest/recursive/src/test/java/sample/Y.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package sample; - -/** - * Simple Service - */ -public interface Y { - - /** - * Simple Operation - * - * @return A String - */ - String yOp(); -} diff --git a/java/sca/itest/recursive/src/test/java/sample/YImpl.java b/java/sca/itest/recursive/src/test/java/sample/YImpl.java deleted file mode 100644 index b8e3a58974..0000000000 --- a/java/sca/itest/recursive/src/test/java/sample/YImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package sample; - -import org.oasisopen.sca.annotation.Service; - -/** - * Implementation of a Simple Service - */ -@Service(Y.class) -public class YImpl implements Y { - - /** - * A simple operation - * - * @return "Y:yOp()" - */ - public String yOp() { - return "Y:yOp()"; - } - -} diff --git a/java/sca/itest/recursive/src/test/java/test/InnerTestCase.java b/java/sca/itest/recursive/src/test/java/test/InnerTestCase.java deleted file mode 100644 index ebb4bc7acb..0000000000 --- a/java/sca/itest/recursive/src/test/java/test/InnerTestCase.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package test; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -public class InnerTestCase extends TestCase { - - private SCADomain domain; - private Aggregator aggregator; - - @Override - protected void setUp() throws Exception { - domain = SCADomain.newInstance("Inner.composite"); - aggregator = domain.getService(Aggregator.class, "Aggregator"); - } - - @Override - protected void tearDown() throws Exception { - domain.close(); - } - - public void test() throws Exception { - try { - String result = aggregator.getAggregatedData(); - assertTrue(result.contains("InnerSource")); - assertTrue(result.contains("InnerSource")); - System.out.println(result); - } catch (Throwable t) { - t.printStackTrace(); - } - } -} diff --git a/java/sca/itest/recursive/src/test/java/test/OuterTestCase.java b/java/sca/itest/recursive/src/test/java/test/OuterTestCase.java deleted file mode 100644 index 6e95f5808b..0000000000 --- a/java/sca/itest/recursive/src/test/java/test/OuterTestCase.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package test; - -import junit.framework.Assert; - -import org.apache.tuscany.sca.host.embedded.SCADomain; -import org.junit.After; -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Test; - -public class OuterTestCase { - - private SCADomain domain; - private Aggregator aggregator; - - @Before - public void setUp() throws Exception { - domain = SCADomain.newInstance("Outer.composite"); - aggregator = domain.getService(Aggregator.class, "Inner"); - } - - @After - public void tearDown() throws Exception { - domain.close(); - } - - @Ignore("TUSCANY-2484") - @Test - public void test() throws Exception { - String result = aggregator.getAggregatedData(); - Assert.assertTrue(result.contains("InnerSource")); - Assert.assertTrue(result.contains("OuterSource")); - System.out.println(result); - } -} diff --git a/java/sca/itest/recursive/src/test/java/test1/composite/CompositeClientTestCase.java b/java/sca/itest/recursive/src/test/java/test1/composite/CompositeClientTestCase.java deleted file mode 100644 index b3abcac06e..0000000000 --- a/java/sca/itest/recursive/src/test/java/test1/composite/CompositeClientTestCase.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package test1.composite; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * Simple client program that invokes the components that we wired together. - */ -public class CompositeClientTestCase extends TestCase { - - private SCADomain scaDomain; - private Target target; - - @Override - protected void setUp() throws Exception { - scaDomain = SCADomain.newInstance("test1/OuterComposite.composite"); - target = scaDomain.getService(Target.class, "Test1TargetComponent/Service_Two"); - } - - @Override - protected void tearDown() throws Exception { - scaDomain.close(); - } - - public void testComposite() throws Exception { - String res = target.hello("Wang Feng"); - assertEquals("TargetTwo: Hello Wang Feng!", res); - } - - // Test for problem in TUSCANY-2010 - public void testURLs() throws Exception { - try { - System.out.println("Component URI: " + scaDomain.getComponentManager().getComponent("Test1TargetComponent").getURI()); - System.out.println(" Service Name: " + scaDomain.getComponentManager().getComponent("Test1TargetComponent").getServices().get(0).getName()); - System.out.println(" Binding Name: " + scaDomain.getComponentManager().getComponent("Test1TargetComponent").getServices().get(0).getBindings().get(0).getName()); - System.out.println(" Binding URI: " + scaDomain.getComponentManager().getComponent("Test1TargetComponent").getServices().get(0).getBindings().get(0).getURI()); - assertEquals("/Test1TargetComponent/Service_One", scaDomain.getComponentManager().getComponent("Test1TargetComponent").getServices().get(0).getBindings().get(0).getURI()); - } catch (Throwable t) { - t.printStackTrace(); - } - } -} |