From b34a906749c927245ba5a79ca07c484bc6850371 Mon Sep 17 00:00:00 2001 From: lresende Date: Tue, 13 Oct 2009 17:39:49 +0000 Subject: Removing unused variables and closing the http session after done with it git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@824856 13f79535-47bb-0310-9956-ffa450edef68 --- .../tuscany/sca/binding/jsonrpc/provider/JSONRPCClientInvoker.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'java/sca/modules/binding-jsonrpc-runtime') diff --git a/java/sca/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCClientInvoker.java b/java/sca/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCClientInvoker.java index 3290993d80..d25861b610 100644 --- a/java/sca/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCClientInvoker.java +++ b/java/sca/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCClientInvoker.java @@ -21,7 +21,7 @@ package org.apache.tuscany.sca.binding.jsonrpc.provider; import java.lang.reflect.Method; -import org.apache.commons.httpclient.HttpClient; +import org.apache.http.client.HttpClient; import org.apache.tuscany.sca.assembly.EndpointReference; import org.apache.tuscany.sca.binding.jsonrpc.JSONRPCBinding; import org.apache.tuscany.sca.interfacedef.Operation; @@ -44,15 +44,11 @@ public class JSONRPCClientInvoker implements Invoker, DataExchangeSemantics { private Method method; private String uri; - private HttpClient httpClient; - public JSONRPCClientInvoker(EndpointReference endpointReference, Operation operation, HttpClient httpClient) { this.endpointReference = endpointReference; this.operation = operation; this.method = ((JavaOperation)operation).getJavaMethod(); this.uri = ((JSONRPCBinding)endpointReference.getBinding()).getURI(); - - this.httpClient = httpClient; } public Message invoke(Message msg) { @@ -67,6 +63,7 @@ public class JSONRPCClientInvoker implements Invoker, DataExchangeSemantics { msg.setFaultBody(e); } finally { client.closeProxy(proxy); + session.close(); } return msg; } -- cgit v1.2.3