HttpClient behavior on close with active connections

2016-11-09 Thread Shawn Heisey
I'm using SolrJ 6.2.1 in the program I'm writing, which pulls in
httpclient/httpmime 4.5.2 and httpcore 4.4.5 as dependencies.

One of the things that my SolrJ code does takes over an hour to
complete.  The HTTP connection is kept open for all that time.  I'd like
to find a way for the Solr server to respond immediately and continue
the operation in the background, but currently there doesn't seem to be
a way to do that.

Now I am attempting to make it possible to gracefully shut down
everything related to what my code does, turn everything into garbage,
reload the configuration, and build it all back up.  Therefore I need to
know how certain things behave at close/shutdown, assuming everything is
not idle.

What happens to a long-lived HTTP connection if another thread calls
close() on the HttpClient?  Does the connection immediately die and
throw an exception, or would the connection finish as expected in its
own time?  If the connection remains open until completion, does the
close() call return immediately, or wait until that connection ends,
whether successful or not?  Are all object references (threads in
particular) properly released and turned into garbage?  I tried to
follow the code, but got lost quickly.  If it's documented somewhere,
please point me at that documentation.

Thanks,
Shawn


-
To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org
For additional commands, e-mail: httpclient-users-h...@hc.apache.org



RetryHandler Per GetMethod

2016-11-09 Thread Murat Balkan
Hello,

Is it possible to set a retry handler per HttpGet? The following code taken
from the documentation only applies to 3x and seems to be deprecated.


httpget.getParams().
setParameter(HttpMethodParams.RETRY_HANDLER, myretryhandler);


What I want to achieve is to set disableAutomaticRetries on the httpclient
level and set them at the httpget level.

Is this supported?

Thanks
Murat