abdera-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Reese (JIRA)" <j...@apache.org>
Subject [jira] Commented: (ABDERA-264) AbderaClient does not release HttpClient connection after method execution
Date Mon, 25 Oct 2010 03:24:19 GMT

    [ https://issues.apache.org/jira/browse/ABDERA-264?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12924437#action_12924437

Nathan Reese commented on ABDERA-264:

Thanks for catching this.

The version of AbderaClient that I submitted for this JIRA releases the HttpMethod immediately
after execution.

The failing unit test attempts to verify the content of a CommonsResponse after executing
a method.  The CommonsResponse class retains the HttpMethod as a private member. Getting the
response content entails getting an InputStream from the HttpMethod instance member.  Since
my version of AbderaClient released the HttpMethod's resources after execution, this unit
test exposed the problems that you discovered.

The CommonsResponse class exposes a method to release the HttpMethod member.  I did not see
this at the time I was working with AbderaClient.  I only saw the behavior of my client hanging
after a few POST attempts.

Since there is an easy way to release the HttpMethod resources, maybe this JIRA should just
be closed.  However, I found this very confusing as someone new to the project.  Maybe AbderaClient
needs better documentation or usage examples to clearly explain that it is the callers responsibility
to release the HttpMethod resources.  Or, why does the caller even need to be concerned with
releasing a private member's resources?  Does the CommonsResponse class really need to retain
the HttpMethod?  This just makes things more complicated for the end user then they need to
be.  What do you think?

> AbderaClient does not release HttpClient connection after method execution
> --------------------------------------------------------------------------
>                 Key: ABDERA-264
>                 URL: https://issues.apache.org/jira/browse/ABDERA-264
>             Project: Abdera
>          Issue Type: Bug
>    Affects Versions: 1.1
>            Reporter: Nathan Reese
>         Attachments: AbderaClient.java
>   Original Estimate: 1h
>  Remaining Estimate: 1h
> AbderaClient does not release HttpClient connection after method execution

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message