forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thors...@apache.org
Subject svn commit: r680996 - in /forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.solr/src/java/org/apache/forrest: http/client/PostFile.java solr/client/SolrUpdateGenerator.java
Date Wed, 30 Jul 2008 12:14:40 GMT
Author: thorsten
Date: Wed Jul 30 05:14:36 2008
New Revision: 680996

URL: http://svn.apache.org/viewvc?rev=680996&view=rev
Log:
Making sure to release the connection that we open in the generator. Adding a new release
method in the postFile and using it in a final block of the generator

Modified:
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.solr/src/java/org/apache/forrest/http/client/PostFile.java
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.solr/src/java/org/apache/forrest/solr/client/SolrUpdateGenerator.java

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.solr/src/java/org/apache/forrest/http/client/PostFile.java
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.solr/src/java/org/apache/forrest/http/client/PostFile.java?rev=680996&r1=680995&r2=680996&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.solr/src/java/org/apache/forrest/http/client/PostFile.java
(original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.solr/src/java/org/apache/forrest/http/client/PostFile.java
Wed Jul 30 05:14:36 2008
@@ -62,6 +62,12 @@
         filePost = prepareFilePost(destinationUrl, srcUrl);
         statusCode = client.executeMethod(filePost);
     }
+    
+    public void releaseConnection(){
+      if (null!=filePost){
+        filePost.releaseConnection();
+      }
+    }
 
     public int statusCode() {
         return statusCode;

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.solr/src/java/org/apache/forrest/solr/client/SolrUpdateGenerator.java
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.solr/src/java/org/apache/forrest/solr/client/SolrUpdateGenerator.java?rev=680996&r1=680995&r2=680996&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.solr/src/java/org/apache/forrest/solr/client/SolrUpdateGenerator.java
(original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.solr/src/java/org/apache/forrest/solr/client/SolrUpdateGenerator.java
Wed Jul 30 05:14:36 2008
@@ -64,6 +64,8 @@
             
         } catch (ServiceException e) {
             throw new ProcessingException(e);
+        }finally{
+          post.releaseConnection();
         }
         
     }



Mime
View raw message