users@jersey.java.net

Re: [Jersey] HttpClient 4.0 (GA) support in jersey ?

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Tue, 25 Aug 2009 10:39:47 +0200

On Aug 24, 2009, at 6:46 PM, Morten wrote:

> --- Den man 24/8/09 skrev Paul Sandoz <Paul.Sandoz_at_Sun.COM>:
>> Agreed. Apache 3.x already has that.
>>
>> What i am searching for is a compelling reasons to spend
>> resources on implementing support for 4.x. I think one
>> compelling reason may be support for non-blocking IO.
>
> I fully understand that you have to prioritize. No critique here.
> You are doing great with jersey. I just added two important bug
> reports to your work yesterday so I am sure you have lots to do :-)
>

One is fixed, the other nearly so (most just documentation
clarifications).


> Personally, I am moving to HTTPClient 4.0 in a month or so and
> consequently won't be able to use Jersey Client for any production
> code (only simple single-threaded unit tests) until Jersey client
> supports HTTPClient 4.0.
>

> Later, If I absolutely need to use Jersey Client in production I am
> willing to help out to convert to HTTP Client 4.0. I will get back
> to you when/if that happens.
>

OK, thanks. That is how the 3.x integration got started, an initial
version was contributed by Jorge Williams and i worked to place
Jorge's code within Jersey. The turn around time was significantly
reduced because of the contribution. In addition other developers
tested the client early on and found bugs, which was most helpful.

FWIW it should be possible to plug in 4.x using the SPI and it should
not require you to modify any Jersey code. See the existing code for
the 3.x integration and the class TerminatingClientHandler:

   https://jersey.dev.java.net/nonav/apidocs/1.1.1-ea/jersey/com/sun/jersey/api/client/TerminatingClientHandler.html

If you are going to spend time developing some form of higher layer
around 4.x you could consider spending that time developing a
TerminatingClientHandler for 4.x instead :-)

Paul.