tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rf...@apache.org
Subject svn commit: r561962 - in /incubator/tuscany/java/sca/itest/callback-multiple-wires: ./ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/tuscany/ src/main/java/org/apache/tuscany/sca/ src/main/java/org/...
Date Wed, 01 Aug 2007 21:24:40 GMT
Author: rfeng
Date: Wed Aug  1 14:24:36 2007
New Revision: 561962

URL: http://svn.apache.org/viewvc?view=rev&rev=561962
Log:
Apply the patch from Simon Nash for TUSCANY-1503.

Added:
    incubator/tuscany/java/sca/itest/callback-multiple-wires/   (with props)
    incubator/tuscany/java/sca/itest/callback-multiple-wires/pom.xml   (with props)
    incubator/tuscany/java/sca/itest/callback-multiple-wires/src/
    incubator/tuscany/java/sca/itest/callback-multiple-wires/src/main/
    incubator/tuscany/java/sca/itest/callback-multiple-wires/src/main/java/
    incubator/tuscany/java/sca/itest/callback-multiple-wires/src/main/java/org/
    incubator/tuscany/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/
    incubator/tuscany/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/
    incubator/tuscany/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/
    incubator/tuscany/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/
    incubator/tuscany/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/
    incubator/tuscany/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClient.java
  (with props)
    incubator/tuscany/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClientImpl1.java
  (with props)
    incubator/tuscany/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClientImpl2.java
  (with props)
    incubator/tuscany/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyService.java
  (with props)
    incubator/tuscany/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyServiceCallback.java
  (with props)
    incubator/tuscany/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyServiceImpl.java
  (with props)
    incubator/tuscany/java/sca/itest/callback-multiple-wires/src/main/resources/
    incubator/tuscany/java/sca/itest/callback-multiple-wires/src/main/resources/CallbackMultiWireTest.composite
    incubator/tuscany/java/sca/itest/callback-multiple-wires/src/test/
    incubator/tuscany/java/sca/itest/callback-multiple-wires/src/test/java/
    incubator/tuscany/java/sca/itest/callback-multiple-wires/src/test/java/org/
    incubator/tuscany/java/sca/itest/callback-multiple-wires/src/test/java/org/apache/
    incubator/tuscany/java/sca/itest/callback-multiple-wires/src/test/java/org/apache/tuscany/
    incubator/tuscany/java/sca/itest/callback-multiple-wires/src/test/java/org/apache/tuscany/sca/
    incubator/tuscany/java/sca/itest/callback-multiple-wires/src/test/java/org/apache/tuscany/sca/test/
    incubator/tuscany/java/sca/itest/callback-multiple-wires/src/test/java/org/apache/tuscany/sca/test/callback/
    incubator/tuscany/java/sca/itest/callback-multiple-wires/src/test/java/org/apache/tuscany/sca/test/callback/CallbackMultiWireTestCase.java
  (with props)

Propchange: incubator/tuscany/java/sca/itest/callback-multiple-wires/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Aug  1 14:24:36 2007
@@ -0,0 +1,13 @@
+target
+*.iws
+*.ipr
+*.iml
+.project
+.classpath
+maven.log
+velocity.log*
+junit*.properties
+surefire*.properties
+.settings
+.deployables
+.wtpmodules

Added: incubator/tuscany/java/sca/itest/callback-multiple-wires/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/callback-multiple-wires/pom.xml?view=auto&rev=561962
==============================================================================
--- incubator/tuscany/java/sca/itest/callback-multiple-wires/pom.xml (added)
+++ incubator/tuscany/java/sca/itest/callback-multiple-wires/pom.xml Wed Aug  1 14:24:36 2007
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+-->
+<project>
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.tuscany.sca</groupId>
+        <artifactId>tuscany-itest</artifactId>
+        <version>1.0-incubating-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+    <artifactId>tuscany-itest-callback-multiple-wires</artifactId>
+    <name>Apache Tuscany SCA Callback With Mutiple Wires Test</name>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-host-embedded</artifactId>
+            <version>1.0-incubating-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-implementation-java-runtime</artifactId>
+            <version>1.0-incubating-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+    </dependencies>
+</project>

Propchange: incubator/tuscany/java/sca/itest/callback-multiple-wires/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/callback-multiple-wires/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClient.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClient.java?view=auto&rev=561962
==============================================================================
--- incubator/tuscany/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClient.java
(added)
+++ incubator/tuscany/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClient.java
Wed Aug  1 14:24:36 2007
@@ -0,0 +1,27 @@
+/*
+ * 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 org.apache.tuscany.sca.test.callback;
+
+/**
+ * The client interface
+ */
+public interface MyClient {
+
+    void aClientMethod();
+}

Propchange: incubator/tuscany/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClient.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClient.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClientImpl1.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClientImpl1.java?view=auto&rev=561962
==============================================================================
--- incubator/tuscany/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClientImpl1.java
(added)
+++ incubator/tuscany/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClientImpl1.java
Wed Aug  1 14:24:36 2007
@@ -0,0 +1,49 @@
+/*
+ * 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 org.apache.tuscany.sca.test.callback;
+
+import org.osoa.sca.annotations.Reference;
+import org.osoa.sca.annotations.Scope;
+import org.osoa.sca.annotations.Service;
+
+/**
+ * Demonstrates a component-to-component callback invocation
+ */
+@Service(MyClient.class)
+@Scope("COMPOSITE")
+public class MyClientImpl1 implements MyClient, MyServiceCallback {
+
+    private MyService myService;
+    static String result;
+
+    @Reference
+    public void setMyService(MyService myService) {
+        this.myService = myService;
+    }
+
+    public void aClientMethod() {
+        myService.someMethod("-> someMethod1");
+    }
+
+    public void receiveResult(String result) {
+        System.out.println("Work thread " + Thread.currentThread());
+        System.out.println("Result: " + result);
+        MyClientImpl1.result = result;
+    }
+}

Propchange: incubator/tuscany/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClientImpl1.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClientImpl1.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClientImpl2.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClientImpl2.java?view=auto&rev=561962
==============================================================================
--- incubator/tuscany/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClientImpl2.java
(added)
+++ incubator/tuscany/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClientImpl2.java
Wed Aug  1 14:24:36 2007
@@ -0,0 +1,49 @@
+/*
+ * 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 org.apache.tuscany.sca.test.callback;
+
+import org.osoa.sca.annotations.Reference;
+import org.osoa.sca.annotations.Scope;
+import org.osoa.sca.annotations.Service;
+
+/**
+ * Demonstrates a component-to-component callback invocation
+ */
+@Service(MyClient.class)
+@Scope("COMPOSITE")
+public class MyClientImpl2 implements MyClient, MyServiceCallback {
+
+    private MyService myService;
+    static String result;
+
+    @Reference
+    public void setMyService(MyService myService) {
+        this.myService = myService;
+    }
+
+    public void aClientMethod() {
+        myService.someMethod("-> someMethod2");
+    }
+
+    public void receiveResult(String result) {
+        System.out.println("Work thread " + Thread.currentThread());
+        System.out.println("Result: " + result);
+        MyClientImpl2.result = result;
+    }
+}

Propchange: incubator/tuscany/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClientImpl2.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClientImpl2.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyService.java?view=auto&rev=561962
==============================================================================
--- incubator/tuscany/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyService.java
(added)
+++ incubator/tuscany/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyService.java
Wed Aug  1 14:24:36 2007
@@ -0,0 +1,32 @@
+/*
+ * 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 org.apache.tuscany.sca.test.callback;
+
+import org.osoa.sca.annotations.Callback;
+import org.osoa.sca.annotations.OneWay;
+
+/**
+ * This service that will be invoked in a non-blocking fashion
+ */
+@Callback(MyServiceCallback.class)
+public interface MyService {
+
+    @OneWay
+    void someMethod(String arg);
+}

Propchange: incubator/tuscany/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyService.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyServiceCallback.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyServiceCallback.java?view=auto&rev=561962
==============================================================================
--- incubator/tuscany/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyServiceCallback.java
(added)
+++ incubator/tuscany/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyServiceCallback.java
Wed Aug  1 14:24:36 2007
@@ -0,0 +1,27 @@
+/*
+ * 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 org.apache.tuscany.sca.test.callback;
+
+/**
+ * The callback interface for {@link MyService}.
+ */
+public interface MyServiceCallback {
+
+    void receiveResult(String result);
+}

Propchange: incubator/tuscany/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyServiceCallback.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyServiceCallback.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyServiceImpl.java?view=auto&rev=561962
==============================================================================
--- incubator/tuscany/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyServiceImpl.java
(added)
+++ incubator/tuscany/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyServiceImpl.java
Wed Aug  1 14:24:36 2007
@@ -0,0 +1,51 @@
+/*
+ * 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 org.apache.tuscany.sca.test.callback;
+
+import org.osoa.sca.annotations.Callback;
+import org.osoa.sca.annotations.Scope;
+import org.osoa.sca.annotations.Service;
+
+/**
+ * This class implements MyService and uses a callback.
+ */
+@Service(MyService.class)
+@Scope("COMPOSITE")
+public class MyServiceImpl implements MyService {
+
+    private MyServiceCallback myServiceCallback;
+
+    /**
+     * The setter used by the runtime to set the callback reference 
+     * @param myServiceCallback
+     */
+    @Callback
+    public void setMyServiceCallback(MyServiceCallback myServiceCallback) {
+        this.myServiceCallback = myServiceCallback;
+    }
+    
+    public void someMethod(String arg) {
+        // invoke the callback
+        try {
+            myServiceCallback.receiveResult(arg + " -> receiveResult");
+        } catch(RuntimeException e) {
+            System.out.println("RuntimeException invoking receiveResult: " + e.toString());
+        }
+    }
+}

Propchange: incubator/tuscany/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyServiceImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyServiceImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/itest/callback-multiple-wires/src/main/resources/CallbackMultiWireTest.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/callback-multiple-wires/src/main/resources/CallbackMultiWireTest.composite?view=auto&rev=561962
==============================================================================
--- incubator/tuscany/java/sca/itest/callback-multiple-wires/src/main/resources/CallbackMultiWireTest.composite
(added)
+++ incubator/tuscany/java/sca/itest/callback-multiple-wires/src/main/resources/CallbackMultiWireTest.composite
Wed Aug  1 14:24:36 2007
@@ -0,0 +1,38 @@
+<?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://callback"
+	name="CallbackMultiWireTest">
+
+    <component name="MyClientComponent1">
+        <implementation.java class="org.apache.tuscany.sca.test.callback.MyClientImpl1"/>
+        <reference name="myService" target="MyServiceComponent"/>
+    </component>
+    
+    <component name="MyClientComponent2">
+        <implementation.java class="org.apache.tuscany.sca.test.callback.MyClientImpl2"/>
+        <reference name="myService" target="MyServiceComponent"/>
+    </component>
+    
+    <component name="MyServiceComponent">
+        <implementation.java class="org.apache.tuscany.sca.test.callback.MyServiceImpl"/>
+    </component>
+    
+</composite>

Added: incubator/tuscany/java/sca/itest/callback-multiple-wires/src/test/java/org/apache/tuscany/sca/test/callback/CallbackMultiWireTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/callback-multiple-wires/src/test/java/org/apache/tuscany/sca/test/callback/CallbackMultiWireTestCase.java?view=auto&rev=561962
==============================================================================
--- incubator/tuscany/java/sca/itest/callback-multiple-wires/src/test/java/org/apache/tuscany/sca/test/callback/CallbackMultiWireTestCase.java
(added)
+++ incubator/tuscany/java/sca/itest/callback-multiple-wires/src/test/java/org/apache/tuscany/sca/test/callback/CallbackMultiWireTestCase.java
Wed Aug  1 14:24:36 2007
@@ -0,0 +1,53 @@
+/*
+ * 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 org.apache.tuscany.sca.test.callback;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.host.embedded.SCADomain;
+
+/**
+ * A testcase that demonstrates resolving the client service and initiating the callback
sequence
+ */
+public class CallbackMultiWireTestCase extends TestCase {
+
+    private SCADomain scaDomain;
+    private MyClient myClient1;
+    private MyClient myClient2;
+
+    protected void setUp() throws Exception {
+        scaDomain = SCADomain.newInstance("CallbackMultiWireTest.composite");
+        myClient1 = scaDomain.getService(MyClient.class, "MyClientComponent1");
+        myClient2 = scaDomain.getService(MyClient.class, "MyClientComponent2");
+    }
+    
+    protected void tearDown() throws Exception {
+        scaDomain.close();
+    }
+
+    public void test() throws Exception {
+        System.out.println("Main thread " + Thread.currentThread());
+        myClient1.aClientMethod();
+        myClient2.aClientMethod();
+        System.out.println("Sleeping ...");
+        Thread.sleep(300);
+        assertEquals("-> someMethod1 -> receiveResult", MyClientImpl1.result);
+        assertEquals("-> someMethod2 -> receiveResult", MyClientImpl2.result);
+    }
+}

Propchange: incubator/tuscany/java/sca/itest/callback-multiple-wires/src/test/java/org/apache/tuscany/sca/test/callback/CallbackMultiWireTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/callback-multiple-wires/src/test/java/org/apache/tuscany/sca/test/callback/CallbackMultiWireTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org


Mime
View raw message