From 512a3d697d367b57d00e40ce26ad9d7d24cef996 Mon Sep 17 00:00:00 2001 From: rfeng Date: Fri, 25 Jun 2010 19:06:09 +0000 Subject: Fix compilation errors git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@958084 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/invocation/JavaAsyncImplementationInvoker.java | 8 ++------ .../java/invocation/JavaComponentContextProvider.java | 3 ++- .../sca/implementation/java/invocation/ResponseDispatchImpl.java | 3 --- 3 files changed, 4 insertions(+), 10 deletions(-) (limited to 'sca-java-2.x/trunk/modules') diff --git a/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaAsyncImplementationInvoker.java b/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaAsyncImplementationInvoker.java index 2e5ca19dd5..005a508217 100644 --- a/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaAsyncImplementationInvoker.java +++ b/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaAsyncImplementationInvoker.java @@ -21,17 +21,13 @@ package org.apache.tuscany.sca.implementation.java.invocation; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; -import java.lang.reflect.Type; import java.util.concurrent.TimeUnit; -import org.apache.tuscany.sca.assembly.EndpointReference; import org.apache.tuscany.sca.core.factory.InstanceWrapper; import org.apache.tuscany.sca.core.factory.ObjectCreationException; -import org.apache.tuscany.sca.core.scope.ScopedRuntimeComponent; -import org.apache.tuscany.sca.implementation.java.JavaImplementation; import org.apache.tuscany.sca.interfacedef.DataType; import org.apache.tuscany.sca.interfacedef.Operation; -import org.apache.tuscany.sca.interfacedef.java.impl.JavaInterfaceUtil; +import org.apache.tuscany.sca.interfacedef.java.JavaOperation; import org.apache.tuscany.sca.invocation.Message; import org.apache.tuscany.sca.runtime.RuntimeComponent; import org.oasisopen.sca.ResponseDispatch; @@ -47,7 +43,7 @@ public class JavaAsyncImplementationInvoker extends JavaImplementationInvoker { public JavaAsyncImplementationInvoker(Operation operation, Method method, RuntimeComponent component) { super( operation, method, component); assert method != null : "Operation method cannot be null"; - assert operation.isAsyncServer() : "Operation must be async"; + assert ((JavaOperation) operation).isAsyncServer() : "Operation must be async"; } // end constructor public Message invoke(Message msg) { diff --git a/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaComponentContextProvider.java b/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaComponentContextProvider.java index 4114193e4e..49de13cddf 100644 --- a/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaComponentContextProvider.java +++ b/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaComponentContextProvider.java @@ -57,6 +57,7 @@ import org.apache.tuscany.sca.implementation.java.context.InstanceFactory; import org.apache.tuscany.sca.implementation.java.injection.JavaPropertyValueObjectFactory; import org.apache.tuscany.sca.implementation.java.introspect.JavaIntrospectionHelper; import org.apache.tuscany.sca.interfacedef.Operation; +import org.apache.tuscany.sca.interfacedef.java.JavaOperation; import org.apache.tuscany.sca.interfacedef.java.impl.JavaInterfaceUtil; import org.apache.tuscany.sca.invocation.Invoker; import org.apache.tuscany.sca.runtime.RuntimeComponent; @@ -291,7 +292,7 @@ public class JavaComponentContextProvider { Class implClass = instanceFactoryProvider.getImplementationClass(); Method method = JavaInterfaceUtil.findMethod(implClass, operation); - if( operation.isAsyncServer() ) { + if( ((JavaOperation) operation).isAsyncServer() ) { return new JavaAsyncImplementationInvoker(operation, method, component); } else { return new JavaImplementationInvoker(operation, method, component); diff --git a/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/ResponseDispatchImpl.java b/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/ResponseDispatchImpl.java index 388a375f54..8cb371f2b9 100644 --- a/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/ResponseDispatchImpl.java +++ b/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/ResponseDispatchImpl.java @@ -68,7 +68,6 @@ public class ResponseDispatchImpl implements ResponseDispatch, Serializabl /** * Provide Context data for this ResponseDispatch that the service implementation can use */ - @Override public Map getContext() { return null; } @@ -78,7 +77,6 @@ public class ResponseDispatchImpl implements ResponseDispatch, Serializabl * @param e - the Fault to send * @throws IllegalStateException if either the sendResponse method or the sendFault method have been called previously */ - @Override public void sendFault(Throwable e) { if( sendOK() ) { lock.lock(); @@ -98,7 +96,6 @@ public class ResponseDispatchImpl implements ResponseDispatch, Serializabl * @throws IllegalStateException if either the sendResponse method or the sendFault method have been called previously * @param res - the response message, which is of type T */ - @Override public void sendResponse(T res) { if( sendOK() ) { lock.lock(); -- cgit v1.2.3