From 45608ba818d35c57fdd0b00a4b1904a680fbf55f Mon Sep 17 00:00:00 2001 From: rfeng Date: Fri, 19 Feb 2010 23:38:00 +0000 Subject: Align the interfaceContractMapper to the spec Remove the conversation related legacy code git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@912034 13f79535-47bb-0310-9956-ffa450edef68 --- .../JavaCallbackRuntimeWireProcessor.java | 3 +-- .../java/invocation/JavaImplementationInvoker.java | 23 ---------------------- 2 files changed, 1 insertion(+), 25 deletions(-) (limited to 'sca-java-2.x/trunk/modules/implementation-java-runtime/src/main') diff --git a/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaCallbackRuntimeWireProcessor.java b/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaCallbackRuntimeWireProcessor.java index c652b95d73..6cd16202ba 100644 --- a/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaCallbackRuntimeWireProcessor.java +++ b/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaCallbackRuntimeWireProcessor.java @@ -82,8 +82,7 @@ public class JavaCallbackRuntimeWireProcessor implements RuntimeWireProcessor { Interface implType = javaInterfaceFactory.createJavaInterface(impl.getJavaClass()); // Ignore the remotable/conversational testing implType.setRemotable(iface.isRemotable()); - implType.setConversational(iface.isConversational()); - return interfaceContractMapper.isCompatible(iface, implType); + return interfaceContractMapper.isCompatibleSubset(iface, implType); } catch (InvalidInterfaceException e) { logger.log(Level.WARNING, e.getMessage(), e); return false; diff --git a/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaImplementationInvoker.java b/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaImplementationInvoker.java index 108fa428da..de6d33fe87 100644 --- a/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaImplementationInvoker.java +++ b/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaImplementationInvoker.java @@ -26,7 +26,6 @@ import org.apache.tuscany.sca.core.factory.InstanceWrapper; import org.apache.tuscany.sca.core.scope.ScopeContainer; import org.apache.tuscany.sca.core.scope.ScopedRuntimeComponent; import org.apache.tuscany.sca.implementation.java.JavaImplementation; -import org.apache.tuscany.sca.interfacedef.ConversationSequence; import org.apache.tuscany.sca.interfacedef.DataType; import org.apache.tuscany.sca.interfacedef.Operation; import org.apache.tuscany.sca.interfacedef.java.impl.JavaInterfaceUtil; @@ -70,7 +69,6 @@ public class JavaImplementationInvoker implements Invoker, DataExchangeSemantics if (op == null) { op = this.operation; } - ConversationSequence sequence = op.getConversationSequence(); Object payload = msg.getBody(); Object contextId = null; @@ -129,27 +127,6 @@ public class JavaImplementationInvoker implements Invoker, DataExchangeSemantics } } - if (sequence != ConversationSequence.CONVERSATION_NONE ){ - try { -// // If the exception is not a business exception then end the conversation -// boolean businessException = false; -// -// for (DataType dataType : operation.getFaultTypes()){ -// if ((dataType.getPhysical() == e.getCause().getClass()) && -// (contextId != null) ){ -// businessException = true; -// break; -// } -// } - - if (!isChecked && contextId != null) { - scopeContainer.remove(contextId); - } - } catch (Exception ex){ - // TODO - sure what the best course of action is here. We have - // a system exception in the middle of a business exception - } - } if (!isChecked) { if (cause instanceof RuntimeException) { throw (RuntimeException)cause; -- cgit v1.2.3