I don't think that an API or SPI should be cluttered too much with
additional stuff just for the sake of testability, since a system can also
be tested using existing technologies. Replacing the stack is not
essentially needed to test a client, since it is rather simple to set up a
local micro http server by the test as a mock.
> -----Original Message-----
> From: Bill Burke [mailto:bburke_at_redhat.com]
> Sent: Donnerstag, 7. April 2011 21:31
> To: jsr339-experts_at_jax-rs-spec.java.net
> Subject: [jsr339-experts] Re: Client framework
>
>
>
> On 4/7/11 3:21 PM, Bill Burke wrote:
> >
> >
> > On 4/7/11 3:10 PM, Markus KARG wrote:
> >> Actually I think for users it would be of more interest to have a
> high
> >> level
> >> API. IMHO least users in the first step will actually want to
> declare
> >> using
> >> a particular http stack, but just want to get started most easily
> with a
> >> stable solution. It's a benefit of your framework to also provide
> this
> >> pluggability, but I don't see that it must be part of the JAX-RS
> >> standard.
> >> You could just support it "under the hood" for example by setting
> system
> >> properties etc. What the users want from my understanding is a
> fluent API
> >> that allows them to talk to any http based REST service. What
> >> technical way
> >> this is done is of low interest. Proof: Nobody asked to ever add
> such a
> >> plugability into JAX-RS 1 (server side) so far. So why should one
> ask for
> >> that on the client side?
> >>
> >
> > Are you talking about the SPI for plugging in a back-end like Apache
> > HTTP Client? (That's what I think you are talking about). If thats
> what
> > you are talking about, I don't really care that much if it is offered
> or
> > not in the spec. Just thought it was something that should be
> > considered. We added it in our framework because GAE users couldn't
> use
> > Apache Http Client.
> >
>
> Oh yeah, we also added it so that we could have a "local-only" executor
> for unit testing, which was also pretty useful.
>
>
> --
> Bill Burke
> JBoss, a division of Red Hat
> http://bill.burkecentral.com