Author: kwilliams
Date: Fri May  9 11:05:22 2008
New Revision: 654901

URL: http://svn.apache.org/viewvc?rev=654901&view=rev
Log:
More tests for conversation callback-miltibidirectional interfaces, TUSCANY-2247

Added:
    
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/
    
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/AServiceCallback.java
   (with props)
    
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/AServiceCallback2.java
   (with props)
    
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/BService.java
   (with props)
    
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/BService2.java
   (with props)
    
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/impl/
    
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/impl/AServiceImpl.java
   (with props)
    
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/impl/BServiceImpl.java
   (with props)
    
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/resources/callback-multi.composite
   (with props)
Modified:
    
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/AService.java
    
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/impl/AServiceImpl.java
    
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/local/impl/AServiceImpl.java
    
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/test/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/CallbackTestCase.java

Modified: 
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/AService.java
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/AService.java?rev=654901&r1=654900&r2=654901&view=diff
==============================================================================
--- 
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/AService.java
 (original)
+++ 
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/AService.java
 Fri May  9 11:05:22 2008
@@ -24,5 +24,7 @@
 public interface AService {
 
     public void testCallback();
+
+    public void testCallback2();
  
 }

Modified: 
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/impl/AServiceImpl.java
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/impl/AServiceImpl.java?rev=654901&r1=654900&r2=654901&view=diff
==============================================================================
--- 
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/impl/AServiceImpl.java
 (original)
+++ 
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/impl/AServiceImpl.java
 Fri May  9 11:05:22 2008
@@ -54,4 +54,8 @@
             Assert.fail("Callback not received by this instance");
     }
 
+    public void testCallback2() {
+       Assert.fail("Should not be called");
+    }
+
 }

Modified: 
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/local/impl/AServiceImpl.java
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/local/impl/AServiceImpl.java?rev=654901&r1=654900&r2=654901&view=diff
==============================================================================
--- 
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/local/impl/AServiceImpl.java
 (original)
+++ 
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/local/impl/AServiceImpl.java
 Fri May  9 11:05:22 2008
@@ -53,5 +53,9 @@
         if (someState == null)
             Assert.fail("Callback not received by this instance");
     }
+    
+    public void testCallback2() {
+        Assert.fail("Not implemented");
+     }
 
 }

Added: 
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/AServiceCallback.java
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/AServiceCallback.java?rev=654901&view=auto
==============================================================================
--- 
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/AServiceCallback.java
 (added)
+++ 
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/AServiceCallback.java
 Fri May  9 11:05:22 2008
@@ -0,0 +1,33 @@
+/*
+ * 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.vtest.javaapi.conversation.callback.multi;
+
+import org.osoa.sca.annotations.Conversational;
+import org.osoa.sca.annotations.Remotable;
+
+/**
+ * Simple Remotable Service
+ */
[EMAIL PROTECTED]
[EMAIL PROTECTED]
+public interface AServiceCallback {
+
+    public void callBack(String someState);
+    
+}

Propchange: 
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/AServiceCallback.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/AServiceCallback.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: 
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/AServiceCallback2.java
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/AServiceCallback2.java?rev=654901&view=auto
==============================================================================
--- 
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/AServiceCallback2.java
 (added)
+++ 
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/AServiceCallback2.java
 Fri May  9 11:05:22 2008
@@ -0,0 +1,33 @@
+/*
+ * 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.vtest.javaapi.conversation.callback.multi;
+
+import org.osoa.sca.annotations.Conversational;
+import org.osoa.sca.annotations.Remotable;
+
+/**
+ * Simple Remotable Service
+ */
[EMAIL PROTECTED]
[EMAIL PROTECTED]
+public interface AServiceCallback2 {
+
+    public void callBack2(String someState);
+    
+}

Propchange: 
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/AServiceCallback2.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/AServiceCallback2.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: 
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/BService.java
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/BService.java?rev=654901&view=auto
==============================================================================
--- 
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/BService.java
 (added)
+++ 
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/BService.java
 Fri May  9 11:05:22 2008
@@ -0,0 +1,39 @@
+/*
+ * 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.vtest.javaapi.conversation.callback.multi;
+
+import org.osoa.sca.annotations.Callback;
+import org.osoa.sca.annotations.Conversational;
+import org.osoa.sca.annotations.Remotable;
+
+/**
+ * Simple Service
+ */
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED](AServiceCallback.class)
+public interface BService {
+
+    public void setState(String someState);
+    
+    public String getState();
+
+    public void testCallBack(String string);
+
+}

Propchange: 
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/BService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/BService.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: 
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/BService2.java
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/BService2.java?rev=654901&view=auto
==============================================================================
--- 
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/BService2.java
 (added)
+++ 
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/BService2.java
 Fri May  9 11:05:22 2008
@@ -0,0 +1,39 @@
+/*
+ * 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.vtest.javaapi.conversation.callback.multi;
+
+import org.osoa.sca.annotations.Callback;
+import org.osoa.sca.annotations.Conversational;
+import org.osoa.sca.annotations.Remotable;
+
+/**
+ * Simple Service
+ */
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED](AServiceCallback2.class)
+public interface BService2 {
+
+    public void setState(String someState);
+    
+    public String getState();
+
+    public void testCallBack2(String string);
+
+}

Propchange: 
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/BService2.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/BService2.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: 
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/impl/AServiceImpl.java
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/impl/AServiceImpl.java?rev=654901&view=auto
==============================================================================
--- 
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/impl/AServiceImpl.java
 (added)
+++ 
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/impl/AServiceImpl.java
 Fri May  9 11:05:22 2008
@@ -0,0 +1,79 @@
+/*
+ * 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.vtest.javaapi.conversation.callback.multi.impl;
+
+import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.Utilities;
+import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.AService;
+import 
org.apache.tuscany.sca.vtest.javaapi.conversation.callback.multi.AServiceCallback;
+import 
org.apache.tuscany.sca.vtest.javaapi.conversation.callback.multi.AServiceCallback2;
+import 
org.apache.tuscany.sca.vtest.javaapi.conversation.callback.multi.BService;
+import 
org.apache.tuscany.sca.vtest.javaapi.conversation.callback.multi.BService2;
+import org.junit.Assert;
+import org.osoa.sca.ServiceReference;
+import org.osoa.sca.annotations.Reference;
+import org.osoa.sca.annotations.Scope;
+import org.osoa.sca.annotations.Service;
+
[EMAIL PROTECTED](AService.class)
[EMAIL PROTECTED]("CONVERSATION")
+public class AServiceImpl implements AService, AServiceCallback , 
AServiceCallback2 {
+
+    @Reference
+    protected ServiceReference<BService> b;
+    
+    @Reference
+    protected ServiceReference<BService2> b2;
+
+
+    private String someState;
+    private String someState2;
+
+    public void callBack(String someState) {
+        System.out.println("A-callback called with this state => " + 
someState);
+        this.someState = someState;
+    }
+
+    public void callBack2(String someState) {
+        System.out.println("A-callback2 called with this state => " + 
someState);
+        this.someState2 = someState;    
+    }
+    
+    public void testCallback() {
+        b.getService().testCallBack("Some string");
+        int count = 4;
+        while (someState == null && count > 0) {
+            Utilities.delayQuarterSecond();
+            count--;
+        }
+        if (someState == null)
+            Assert.fail("Callback not received by this instance");
+    }
+
+    public void testCallback2() {
+        b2.getService().testCallBack2("Some string");
+        int count = 4;
+        while (someState2 == null && count > 0) {
+            Utilities.delayQuarterSecond();
+            count--;
+        }
+        if (someState2 == null)
+            Assert.fail("Callback not received by this instance");
+    }
+}

Propchange: 
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/impl/AServiceImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/impl/AServiceImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: 
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/impl/BServiceImpl.java
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/impl/BServiceImpl.java?rev=654901&view=auto
==============================================================================
--- 
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/impl/BServiceImpl.java
 (added)
+++ 
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/impl/BServiceImpl.java
 Fri May  9 11:05:22 2008
@@ -0,0 +1,58 @@
+/*
+ * 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.vtest.javaapi.conversation.callback.multi.impl;
+
+import 
org.apache.tuscany.sca.vtest.javaapi.conversation.callback.multi.AServiceCallback;
+import 
org.apache.tuscany.sca.vtest.javaapi.conversation.callback.multi.AServiceCallback2;
+import 
org.apache.tuscany.sca.vtest.javaapi.conversation.callback.multi.BService;
+import 
org.apache.tuscany.sca.vtest.javaapi.conversation.callback.multi.BService2;
+import org.osoa.sca.annotations.Callback;
+import org.osoa.sca.annotations.Scope;
+import org.osoa.sca.annotations.Service;
+
[EMAIL PROTECTED](interfaces= {BService.class,BService2.class})
[EMAIL PROTECTED]("CONVERSATION")
+public class BServiceImpl implements BService, BService2 {
+
+    String someState;
+
+    @Callback
+    protected AServiceCallback callback;
+
+    @Callback
+    protected AServiceCallback2 callback2;
+
+    public void setState(String someState) {
+        this.someState = someState;
+    }
+
+    public String getState() {
+        return someState;
+    }
+
+    public void testCallBack(String someState) {
+        callback.callBack(someState);
+    }
+
+    public void testCallBack2(String someState) {
+        callback2.callBack2(someState);
+    }
+
+}

Propchange: 
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/impl/BServiceImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/impl/BServiceImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: 
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/resources/callback-multi.composite
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/resources/callback-multi.composite?rev=654901&view=auto
==============================================================================
--- 
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/resources/callback-multi.composite
 (added)
+++ 
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/resources/callback-multi.composite
 Fri May  9 11:05:22 2008
@@ -0,0 +1,35 @@
+<?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://java-api-tests"; 
name="Conversation-callback-multi">
+
+       <component name="AComponent">
+               <implementation.java
+                       
class="org.apache.tuscany.sca.vtest.javaapi.conversation.callback.multi.impl.AServiceImpl"
 />
+               <reference name="b" target="BComponent/BService" />
+               <reference name="b2" target="BComponent/BService2" />
+       </component>
+
+       <component name="BComponent">
+               <implementation.java
+                       
class="org.apache.tuscany.sca.vtest.javaapi.conversation.callback.multi.impl.BServiceImpl"
 />
+       </component>
+
+</composite>

Propchange: 
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/resources/callback-multi.composite
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/resources/callback-multi.composite
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: 
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/main/resources/callback-multi.composite
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: 
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/test/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/CallbackTestCase.java
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/test/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/CallbackTestCase.java?rev=654901&r1=654900&r2=654901&view=diff
==============================================================================
--- 
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/test/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/CallbackTestCase.java
 (original)
+++ 
incubator/tuscany/java/sca/vtest/java-api/conversation/callback/src/test/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/CallbackTestCase.java
 Fri May  9 11:05:22 2008
@@ -250,7 +250,6 @@
      * callback field would be null when the message from the backend system 
was
      * received.
      * <p>
-     * 
      */
     @Test
     // @Ignore("TUSCANY-2306")
@@ -262,4 +261,25 @@
 
     }
 
+    /**
+     * Lines 658-669
+     * <p>
+     * Since it is possible for a single implementation class to implement
+     * multiple services, it is also possible for callbacks to be defined for
+     * each of the services that it implements. The service implementation can
+     * include an injected field for each of its callbacks. The runtime injects
+     * the callback onto the appropriate field based on the type of the
+     * callback. The following shows the declaration of two fields, each of
+     * which corresponds to a particular service offered by the implementation.
+     * <p>
+     */
+    @Test
+    public void statefulMultiBidirectional() throws Exception {
+        System.out.println("Setting up for multi-bidirectional interfaces 
tests");
+        domain = SCADomain.newInstance("callback-multi.composite");
+        aService = domain.getService(AService.class, "AComponent");
+        aService.testCallback();
+        aService.testCallback2();
+
+    }
 }


Reply via email to