I'm not sure what you're asking for.  Adding support for Apache's
HTTPClient is, for me, a good thing for the future when they finally
support NIO-based use.

The standard JDK's HttpURLConnection has always been a wacky approach
and then they add more wackiness underneath it to try and make up for
the bad original design.  For example, all of the conditions that must
be met before the connection is "transparently" reused.

Thanks,
John

On 11/27/06, Jerome Louvel <[EMAIL PROTECTED]> wrote:
The bug report was posted on Sun's site
(http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6495923) and has the
following evaluation comment:

"The description is not accurate. HttpURLConnection does support
persistent connections. By default it maintains an internal cache of
connections, allowing it to reuse the same connection for multiple
requests to the same host/proxy. There is no requirement for the
HttpURLConnection instance to be the same. The cache is static and is
across all HttpURLConnections.

To take advantage of this feature couldn't be easier, simply read the
data off the InputStream and close it when finished. It is the close
action that will try to put the actual underlying connection into the
"keep alive" cache.

see:
  http://java.sun.com/j2se/1.5.0/docs/guide/net/http-keepalive.html
  http://blogs.sun.com/chegar/entry/http_keep_alive_improvements
"

Any thought?

Best,
Jerome


Jerome Louvel :
> Hi John,
>
> I've reported the issue with connection reuse in JDK's HttpUrlConnection
> class and suggested that they add a transparent reuse mechanism similar
> to Apache HTTP Client.
>
> The bug report was accepted and will show at this URL in a couple of
> days: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6495923
>
> Best regards,
> Jerome

Reply via email to