summaryrefslogtreecommitdiffstats
path: root/java/sca-contrib/itest/callablereferences/src/main/java/org/apache
diff options
context:
space:
mode:
Diffstat (limited to 'java/sca-contrib/itest/callablereferences/src/main/java/org/apache')
-rw-r--r--java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/AComponent.java39
-rw-r--r--java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/AComponentImpl.java114
-rw-r--r--java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/BComponent.java30
-rw-r--r--java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/BComponentImpl.java38
-rw-r--r--java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/CComponent.java27
-rw-r--r--java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/CComponentImpl.java30
-rw-r--r--java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/DComponent.java30
-rw-r--r--java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/DComponentImpl.java65
-rw-r--r--java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callablerefconversational/ConversationalService.java68
-rw-r--r--java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callablerefconversational/ConversationalServiceImpl.java111
-rw-r--r--java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callablerefreturn/Alpha.java27
-rw-r--r--java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callablerefreturn/AlphaImpl.java86
-rw-r--r--java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callablerefreturn/Beta.java28
-rw-r--r--java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callablerefreturn/BetaImpl.java44
-rw-r--r--java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callablerefreturn/Gamma.java35
-rw-r--r--java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callablerefreturn/GammaImpl.java47
16 files changed, 0 insertions, 819 deletions
diff --git a/java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/AComponent.java b/java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/AComponent.java
deleted file mode 100644
index 33783be887..0000000000
--- a/java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/AComponent.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 org.apache.tuscany.sca.itest.callableref;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-@Remotable
-public interface AComponent {
- String foo();
-
- String fooB();
- String fooB1();
-
- String fooC();
- String fooC1();
-
- String fooStringD();
- String fooD();
-
- String fooBC();
-
- String invokeDReference();
-}
diff --git a/java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/AComponentImpl.java b/java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/AComponentImpl.java
deleted file mode 100644
index f99051cd5f..0000000000
--- a/java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/AComponentImpl.java
+++ /dev/null
@@ -1,114 +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.itest.callableref;
-
-import java.io.ByteArrayOutputStream;
-import java.io.ObjectOutputStream;
-
-import org.apache.tuscany.sca.databinding.impl.XSDDataTypeConverter.Base64Binary;
-import org.oasisopen.sca.CallableReference;
-import org.oasisopen.sca.ComponentContext;
-import org.oasisopen.sca.ServiceReference;
-import org.oasisopen.sca.annotation.Context;
-import org.oasisopen.sca.annotation.Reference;
-import org.oasisopen.sca.annotation.Service;
-
-@Service(AComponent.class)
-public class AComponentImpl implements AComponent {
-
- @Context
- protected ComponentContext componentContext;
-
- @Reference(name = "bReference")
- protected BComponent b;
-
- @Reference
- protected CComponent cReference;
-
- @Reference
- protected ServiceReference<CComponent> cServiceReference;
-
- @Reference(required=false)
- protected DComponent dReference;
-
- protected DComponent dReference1;
-
- @Reference(name = "dReference1")
- public void setDReference(DComponent dReference) {
- this.dReference1 = dReference;
- }
-
- public String foo() {
- return "AComponent";
- }
-
- public String fooB() {
- return b.foo();
- }
-
- public String fooB1() {
- CallableReference<BComponent> bRef = componentContext.cast(b);
- return bRef.getService().foo();
- }
-
- public String fooC() {
- return cReference.foo();
- }
-
- public String fooC1() {
- return cServiceReference.getService().foo();
- }
-
- public String fooBC() {
- CallableReference<CComponent> cReference = componentContext.getServiceReference(CComponent.class, "cReference");
- return b.fooC(cReference);
- }
-
- public String fooD() {
- CallableReference<AComponent> aReference = componentContext.createSelfReference(AComponent.class);
- return dReference1.foo(aReference);
- }
-
- /**
- * A test case to work out what needs to be done in a transformer to get the
- * CallableReference across the wire. Left here for interest in case anyone
- * is looking for how to get at the innards of CallableReferences
- */
- public String fooStringD() {
- CallableReference<AComponent> aReference = componentContext.createSelfReference(AComponent.class);
- ByteArrayOutputStream bos = null;
-
- try {
- bos = new ByteArrayOutputStream();
- ObjectOutputStream oos = new ObjectOutputStream(bos);
- oos.writeObject(aReference);
- } catch (Exception ex) {
- System.out.println(ex.toString());
- return null;
- }
-
- String aReferenceString = Base64Binary.encode(bos.toByteArray());
- return dReference1.fooString(aReferenceString);
- }
-
- public String invokeDReference() {
- return dReference.foo(null);
- }
-
-}
diff --git a/java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/BComponent.java b/java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/BComponent.java
deleted file mode 100644
index 1cf3029d82..0000000000
--- a/java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/BComponent.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 org.apache.tuscany.sca.itest.callableref;
-
-import org.oasisopen.sca.CallableReference;
-import org.oasisopen.sca.annotation.Remotable;
-
-@Remotable
-public interface BComponent {
-
- String foo();
-
- String fooC(CallableReference<CComponent> cComponent);
-}
diff --git a/java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/BComponentImpl.java b/java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/BComponentImpl.java
deleted file mode 100644
index 084572b6e5..0000000000
--- a/java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/BComponentImpl.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.itest.callableref;
-
-import org.oasisopen.sca.CallableReference;
-import org.oasisopen.sca.annotation.Service;
-
-@Service(BComponent.class)
-public class BComponentImpl implements BComponent {
-
- public BComponentImpl() {
- }
-
- public String foo() {
- return "BComponent";
- }
-
- public String fooC(CallableReference<CComponent> cReference) {
- return "B" + cReference.getService().foo();
- }
-
-}
diff --git a/java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/CComponent.java b/java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/CComponent.java
deleted file mode 100644
index 059f42c4d3..0000000000
--- a/java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/CComponent.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 org.apache.tuscany.sca.itest.callableref;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-@Remotable
-public interface CComponent {
-
- String foo();
-}
diff --git a/java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/CComponentImpl.java b/java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/CComponentImpl.java
deleted file mode 100644
index 76fdd61191..0000000000
--- a/java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/CComponentImpl.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 org.apache.tuscany.sca.itest.callableref;
-
-import org.oasisopen.sca.annotation.Service;
-
-@Service(CComponent.class)
-public class CComponentImpl implements CComponent {
-
- public String foo() {
- return "CComponent";
- }
-
-}
diff --git a/java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/DComponent.java b/java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/DComponent.java
deleted file mode 100644
index 8b2988b700..0000000000
--- a/java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/DComponent.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 org.apache.tuscany.sca.itest.callableref;
-
-import org.oasisopen.sca.CallableReference;
-import org.oasisopen.sca.annotation.Remotable;
-
-@Remotable
-public interface DComponent {
-
- String foo(CallableReference<AComponent> aReference);
-
- String fooString(String aReferenceString);
-}
diff --git a/java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/DComponentImpl.java b/java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/DComponentImpl.java
deleted file mode 100644
index a43b3818c5..0000000000
--- a/java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/DComponentImpl.java
+++ /dev/null
@@ -1,65 +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.itest.callableref;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-
-import org.apache.tuscany.sca.databinding.impl.XSDDataTypeConverter.Base64Binary;
-import org.oasisopen.sca.CallableReference;
-import org.oasisopen.sca.RequestContext;
-import org.oasisopen.sca.annotation.Context;
-import org.oasisopen.sca.annotation.Service;
-
-@Service(DComponent.class)
-public class DComponentImpl implements DComponent {
-
- @Context
- protected RequestContext requestContext;
-
- public String foo(CallableReference<AComponent> aReference) {
- try {
- ByteArrayOutputStream bos = new ByteArrayOutputStream();
- ObjectOutputStream oos = new ObjectOutputStream(bos);
- oos.writeObject(aReference);
- ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(bos.toByteArray()));
- Object obj = ois.readObject();
- aReference = (CallableReference<AComponent>) obj;
- } catch (Exception e) {
- e.printStackTrace();
- }
- System.out.println("Invoking service: " + requestContext.getServiceName());
- return "D" + aReference.getService().foo();
- }
-
- public String fooString(String aReferenceString) {
- CallableReference<AComponent> aReference = null;
- try {
- ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(Base64Binary.decode(aReferenceString)));
- Object obj = ois.readObject();
- aReference = (CallableReference<AComponent>) obj;
- } catch (Exception e) {
- e.printStackTrace();
- }
- System.out.println("Invoking service: " + requestContext.getServiceName());
- return "D" + aReference.getService().foo();
- }
-}
diff --git a/java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callablerefconversational/ConversationalService.java b/java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callablerefconversational/ConversationalService.java
deleted file mode 100644
index 33bc49e4d8..0000000000
--- a/java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callablerefconversational/ConversationalService.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 org.apache.tuscany.sca.itest.callablerefconversational;
-
-import org.oasisopen.sca.ServiceReference;
-import org.oasisopen.sca.annotation.Conversational;
-
-/**
- * Simple conversational Service that is used to testing the method
- * ComponentContext.createSelfReference()
- *
- * @version $Date$ $Revision$
- */
-@Conversational
-public interface ConversationalService {
- /**
- * Default value for the user data
- */
- String DEFAULT_USER_DATA = "NOT SET";
-
- /**
- * Retrieves the conversation ID for this Service
- *
- * @return The conversation ID for this Service
- */
- Object getConversationID();
-
- /**
- * Creates a self reference to this Service
- *
- * @return A self reference to this Service
- */
- ServiceReference<ConversationalService> createSelfRef();
-
- /**
- * Sets some user data on the instance
- *
- * @param a_Data Some data
- *
- * @See {@link #getUserData()}
- */
- void setUserData(String a_Data);
-
- /**
- * Gets some user data on the instance
- *
- * @return Some data
- *
- * @See {@link #setUserData(String)}
- */
- String getUserData();
-}
diff --git a/java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callablerefconversational/ConversationalServiceImpl.java b/java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callablerefconversational/ConversationalServiceImpl.java
deleted file mode 100644
index 36bafba562..0000000000
--- a/java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callablerefconversational/ConversationalServiceImpl.java
+++ /dev/null
@@ -1,111 +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.itest.callablerefconversational;
-
-import org.oasisopen.sca.ComponentContext;
-import org.oasisopen.sca.ServiceReference;
-import org.oasisopen.sca.annotation.Context;
-import org.oasisopen.sca.annotation.ConversationID;
-import org.oasisopen.sca.annotation.Scope;
-import org.oasisopen.sca.annotation.Service;
-
-/**
- * Simple conversational Service that is used to testing the method
- * ComponentContext.createSelfReference()
- *
- * @version $Date$ $Revision$
- */
-@Service(ConversationalService.class)
-@Scope("CONVERSATION")
-public class ConversationalServiceImpl implements ConversationalService {
-
- /**
- * The Conversation ID
- */
- private Object m_ConversationID;
-
- /**
- * Reference to the ComponentContext.
- */
- @Context
- protected ComponentContext m_Ctx;
-
- /**
- * Some user data
- */
- private String m_UserData = DEFAULT_USER_DATA;
-
- /**
- * Constructor
- */
- public ConversationalServiceImpl() {
- System.out.println("New instance of " + this + " created");
- }
-
- /**
- * Used to inject the Conversation ID
- *
- * @param a_ConversationID the Conversation ID
- */
- @ConversationID
- public void setConversationID(Object a_ConversationID) {
- m_ConversationID = a_ConversationID;
- System.out.println("Converstation ID set on " + this + " to " + a_ConversationID);
- }
-
- /**
- * Retrieves the conversation ID for this Service
- *
- * @return The conversation ID for this Service
- */
- public Object getConversationID() {
- return m_ConversationID;
- }
-
- /**
- * Creates a self reference to this Service
- *
- * @return A self reference to this Service
- */
- public ServiceReference<ConversationalService> createSelfRef() {
- return m_Ctx.createSelfReference(ConversationalService.class);
- }
-
- /**
- * Sets some user data on the instance
- *
- * @param a_Data Some data
- *
- * @See {@link #getUserData()}
- */
- public void setUserData(String a_Data) {
- m_UserData = a_Data;
- }
-
- /**
- * Gets some user data on the instance
- *
- * @return Some data
- *
- * @See {@link #setUserData(String)}
- */
- public String getUserData() {
- return m_UserData;
- }
-}
diff --git a/java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callablerefreturn/Alpha.java b/java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callablerefreturn/Alpha.java
deleted file mode 100644
index bf5a2e65cc..0000000000
--- a/java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callablerefreturn/Alpha.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 org.apache.tuscany.sca.itest.callablerefreturn;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-@Remotable
-public interface Alpha
-{
- boolean run();
-}
diff --git a/java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callablerefreturn/AlphaImpl.java b/java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callablerefreturn/AlphaImpl.java
deleted file mode 100644
index 59fed12279..0000000000
--- a/java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callablerefreturn/AlphaImpl.java
+++ /dev/null
@@ -1,86 +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.itest.callablerefreturn;
-
-import org.oasisopen.sca.CallableReference;
-import org.oasisopen.sca.ComponentContext;
-import org.oasisopen.sca.Conversation;
-import org.oasisopen.sca.annotation.Context;
-import org.oasisopen.sca.annotation.Reference;
-import org.oasisopen.sca.annotation.Scope;
-
-@Scope("COMPOSITE")
-public class AlphaImpl implements Alpha {
- @Reference
- public Beta beta;
-
- @Context
- protected ComponentContext componentContext;
-
- public boolean run() {
- CallableReference<Gamma> gammaRef = null;
- try {
- Object conversationId1 = null;
- Object conversationId2 = null;
-
- // it is expected that this call returns a reference to Gamma that
- // reuses the established Conversation
- gammaRef = beta.getRef();
-
- // no Conversation exists
- Conversation con = gammaRef.getConversation();
- if (con == null) {
- System.out.println("Alpha: Conversation to gamma is null");
- } else {
- System.out
- .println("Alpha: Conversation to gamma exists. conversationId="
- + con.getConversationID());
- conversationId1 = con.getConversationID();
- }
-
- // this call should reuse a Conversation, but as none exists it
- // creates a new conversation
- gammaRef.getService().doSomething();
- con = gammaRef.getConversation();
- if (con == null) {
- System.out.println("Alpha: Conversation to gamma is null");
- } else {
- System.out
- .println("Alpha: Conversation to gamma exists. conversationId="
- + con.getConversationID());
- conversationId2 = con.getConversationID();
- }
-
- if ((conversationId1 == null) || (conversationId2 == null)) {
- return false;
- }
-
- boolean testPassed = conversationId1.equals(conversationId2);
- return testPassed;
- } catch (Exception e) {
- e.printStackTrace();
- return false;
- } finally {
- if (gammaRef != null) {
- gammaRef.getService().stop();
- }
- }
- }
-
-}
diff --git a/java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callablerefreturn/Beta.java b/java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callablerefreturn/Beta.java
deleted file mode 100644
index b8dd1c5640..0000000000
--- a/java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callablerefreturn/Beta.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 org.apache.tuscany.sca.itest.callablerefreturn;
-
-import org.oasisopen.sca.CallableReference;
-import org.oasisopen.sca.annotation.Remotable;
-
-@Remotable
-public interface Beta
-{
- CallableReference<Gamma> getRef();
-}
diff --git a/java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callablerefreturn/BetaImpl.java b/java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callablerefreturn/BetaImpl.java
deleted file mode 100644
index 8425425c16..0000000000
--- a/java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callablerefreturn/BetaImpl.java
+++ /dev/null
@@ -1,44 +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.itest.callablerefreturn;
-
-import org.oasisopen.sca.CallableReference;
-import org.oasisopen.sca.ComponentContext;
-import org.oasisopen.sca.ServiceReference;
-import org.oasisopen.sca.annotation.Context;
-import org.oasisopen.sca.annotation.Reference;
-import org.oasisopen.sca.annotation.Scope;
-
-@Scope("COMPOSITE")
-public class BetaImpl implements Beta
-{
- @Context
- protected ComponentContext componentContext;
-
- @Reference
- public Gamma gamma;
-
- public CallableReference<Gamma> getRef()
- {
- ServiceReference<Gamma> gammaRef = componentContext.getServiceReference(Gamma.class, "gamma");
- gammaRef.getService().start();
- return gammaRef;
- }
-
-}
diff --git a/java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callablerefreturn/Gamma.java b/java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callablerefreturn/Gamma.java
deleted file mode 100644
index 445fb7bf7f..0000000000
--- a/java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callablerefreturn/Gamma.java
+++ /dev/null
@@ -1,35 +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.itest.callablerefreturn;
-
-import org.oasisopen.sca.annotation.Conversational;
-import org.oasisopen.sca.annotation.EndsConversation;
-import org.oasisopen.sca.annotation.Remotable;
-
-@Remotable
-@Conversational
-public interface Gamma
-{
- void start();
-
- void doSomething();
-
- @EndsConversation
- void stop();
-}
diff --git a/java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callablerefreturn/GammaImpl.java b/java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callablerefreturn/GammaImpl.java
deleted file mode 100644
index 0670629bae..0000000000
--- a/java/sca-contrib/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callablerefreturn/GammaImpl.java
+++ /dev/null
@@ -1,47 +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.itest.callablerefreturn;
-
-import org.oasisopen.sca.annotation.ConversationID;
-import org.oasisopen.sca.annotation.Scope;
-
-@Scope("CONVERSATION")
-public class GammaImpl implements Gamma
-{
- @ConversationID
- protected String conversationId;
-
-
- public void start()
- {
- System.out.println("Gamma:start(), conversationId=" + conversationId);
- }
-
-
- public void doSomething()
- {
- System.out.println("Gamma:doSomething(), conversationId=" + conversationId);
- }
-
-
- public void stop()
- {
- System.out.println("Gamma:stop(), conversationId=" + conversationId);
- }
-}