summaryrefslogtreecommitdiffstats
path: root/branches/sca-java-1.x/vtest/java-api/conversation/callback
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-01-29 15:00:33 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-01-29 15:00:33 +0000
commit62bd754d0a94844170a304b616fc7bc1b0cc6979 (patch)
tree08e3aba639e02ec584049ab5e92ea2ffc7452bba /branches/sca-java-1.x/vtest/java-api/conversation/callback
parent9d36a7f7532af350c29467a75b8b89e6757b3d21 (diff)
TUSCANY-2291, Separate the mixed callback error validation test from the other callback tests so that the error doesn't affect the rest of the tests
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@738875 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.x/vtest/java-api/conversation/callback')
-rw-r--r--branches/sca-java-1.x/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/mixed/CService.java38
-rw-r--r--branches/sca-java-1.x/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/mixed/impl/BServiceImpl.java73
-rw-r--r--branches/sca-java-1.x/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/mixed/impl/CServiceImpl.java49
-rw-r--r--branches/sca-java-1.x/vtest/java-api/conversation/callback/src/main/resources/callback-mixed.composite40
-rw-r--r--branches/sca-java-1.x/vtest/java-api/conversation/callback/src/test/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/CallbackTestCase.java19
5 files changed, 0 insertions, 219 deletions
diff --git a/branches/sca-java-1.x/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/mixed/CService.java b/branches/sca-java-1.x/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/mixed/CService.java
deleted file mode 100644
index 705e101a01..0000000000
--- a/branches/sca-java-1.x/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/mixed/CService.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 org.apache.tuscany.sca.vtest.javaapi.conversation.callback.mixed;
-
-import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.BServiceCallback;
-import org.osoa.sca.annotations.Callback;
-import org.osoa.sca.annotations.Conversational;
-
-/**
- * Simple Service
- */
-@Conversational
-@Callback(BServiceCallback.class)
-public interface CService {
-
- public void setState(String someState);
-
- public String getState();
-
- public void testCallBack(String string);
-
-}
diff --git a/branches/sca-java-1.x/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/mixed/impl/BServiceImpl.java b/branches/sca-java-1.x/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/mixed/impl/BServiceImpl.java
deleted file mode 100644
index c03b1aedc4..0000000000
--- a/branches/sca-java-1.x/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/mixed/impl/BServiceImpl.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 org.apache.tuscany.sca.vtest.javaapi.conversation.callback.mixed.impl;
-
-import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.AServiceCallback;
-import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.BService;
-import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.BServiceCallback;
-import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.mixed.CService;
-import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.Utilities;
-import org.junit.Assert;
-import org.osoa.sca.ServiceReference;
-import org.osoa.sca.annotations.Callback;
-import org.osoa.sca.annotations.Reference;
-import org.osoa.sca.annotations.Scope;
-import org.osoa.sca.annotations.Service;
-
-@Service(BService.class)
-@Scope("CONVERSATION")
-public class BServiceImpl implements BService, BServiceCallback {
-
- String someState;
-
- @Callback
- protected AServiceCallback callback;
-
- @Reference
- protected ServiceReference<CService> c;
-
- public void setState(String someState) {
- this.someState = someState;
- }
-
- public String getState() {
- return someState;
- }
-
- public void callBack(String someState) {
- System.out.println("B-callback called with this state => " + someState);
- this.someState = someState;
- }
-
- public void testCallBack(String someState) {
-
- c.getService().testCallBack(someState);
- int count = 4;
- while (this.someState == null && count > 0) {
- Utilities.delayQuarterSecond();
- count--;
- }
- if (this.someState == null)
- Assert.fail("Callback not received by this instance");
-
- callback.callBack(someState);
- }
-
-}
diff --git a/branches/sca-java-1.x/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/mixed/impl/CServiceImpl.java b/branches/sca-java-1.x/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/mixed/impl/CServiceImpl.java
deleted file mode 100644
index 8e068c8be4..0000000000
--- a/branches/sca-java-1.x/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/mixed/impl/CServiceImpl.java
+++ /dev/null
@@ -1,49 +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 org.apache.tuscany.sca.vtest.javaapi.conversation.callback.mixed.impl;
-
-import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.BServiceCallback;
-import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.mixed.CService;
-import org.osoa.sca.annotations.Callback;
-import org.osoa.sca.annotations.Scope;
-import org.osoa.sca.annotations.Service;
-
-@Service(CService.class)
-@Scope("CONVERSATION")
-public class CServiceImpl implements CService {
-
- String someState;
-
- @Callback
- protected BServiceCallback callback;
-
- public void setState(String someState) {
- this.someState = someState;
- }
-
- public String getState() {
- return someState;
- }
-
- public void testCallBack(String someState) {
- callback.callBack(someState);
- }
-
-}
diff --git a/branches/sca-java-1.x/vtest/java-api/conversation/callback/src/main/resources/callback-mixed.composite b/branches/sca-java-1.x/vtest/java-api/conversation/callback/src/main/resources/callback-mixed.composite
deleted file mode 100644
index d2d9956103..0000000000
--- a/branches/sca-java-1.x/vtest/java-api/conversation/callback/src/main/resources/callback-mixed.composite
+++ /dev/null
@@ -1,40 +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://java-api-tests" name="Conversation-callback-mixed">
-<!-- TODO: TUSCANY-2291
- <component name="AComponent">
- <implementation.java
- class="org.apache.tuscany.sca.vtest.javaapi.conversation.callback.impl.AServiceImpl" />
- <reference name="b" target="BComponent" />
- </component>
-
- <component name="BComponent">
- <implementation.java
- class="org.apache.tuscany.sca.vtest.javaapi.conversation.callback.mixed.impl.BServiceImpl" />
- <reference name="c" target="CComponent" />
- </component>
-
- <component name="CComponent">
- <implementation.java
- class="org.apache.tuscany.sca.vtest.javaapi.conversation.callback.mixed.impl.CServiceImpl" />
- </component>
--->
-</composite>
diff --git a/branches/sca-java-1.x/vtest/java-api/conversation/callback/src/test/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/CallbackTestCase.java b/branches/sca-java-1.x/vtest/java-api/conversation/callback/src/test/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/CallbackTestCase.java
index dc681a4e7e..bd8f116c10 100644
--- a/branches/sca-java-1.x/vtest/java-api/conversation/callback/src/test/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/CallbackTestCase.java
+++ b/branches/sca-java-1.x/vtest/java-api/conversation/callback/src/test/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/CallbackTestCase.java
@@ -174,25 +174,6 @@ public class CallbackTestCase {
}
/**
- * Lines 534, 535
- * <p>
- * Callbacks may be used for both remotable and local services. Either both
- * interfaces of a bidirectional service must be remotable, or both must be
- * local. It is illegal to mix the two.
- * <p>
- * In this test configuration BServiceCallback is remotable and CService is
- * not
- */
- @Test(expected = ServiceRuntimeException.class)
- @Ignore("TUSCANY-2291")
- public void statefulMixedCallback() throws Exception {
- System.out.println("Setting up for mixed local/remote callback tests");
- ServiceFinder.init("callback-mixed.composite");
- aService = ServiceFinder.getService(AService.class, "AComponent");
- aService.testCallback();
- }
-
- /**
* Lines 613-615
* <p>
* A stateless callback interface is a callback whose interface is not