You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by lr...@apache.org on 2009/10/13 19:39:49 UTC

svn commit: r824856 - /tuscany/java/sca/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCClientInvoker.java

Author: lresende
Date: Tue Oct 13 17:39:49 2009
New Revision: 824856

URL: http://svn.apache.org/viewvc?rev=824856&view=rev
Log:
Removing unused variables and closing the http session after done with it

Modified:
    tuscany/java/sca/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCClientInvoker.java

Modified: tuscany/java/sca/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCClientInvoker.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCClientInvoker.java?rev=824856&r1=824855&r2=824856&view=diff
==============================================================================
--- tuscany/java/sca/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCClientInvoker.java (original)
+++ tuscany/java/sca/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCClientInvoker.java Tue Oct 13 17:39:49 2009
@@ -21,7 +21,7 @@
 
 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 @@
     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 @@
             msg.setFaultBody(e);
         } finally {
             client.closeProxy(proxy);
+            session.close();
         }
         return msg;
     }