users@jersey.java.net

Re: [Jersey] Configuration of default Entity Providers

From: Tatu Saloranta <tsaloranta_at_gmail.com>
Date: Wed, 26 May 2010 11:26:39 -0700

On Wed, May 26, 2010 at 2:22 AM, Paul Sandoz <Paul.Sandoz_at_sun.com> wrote:
...
> The idea of say including the jersey-json or jersey-multipart in the class
> path and readers/writers getting automatically included was very appealing
> initially, but i think it causes issues for developers because they do not
> exactly know what is going on and it can cause conflicts e.g. when Jackson
> is to be used.
>
> Thus it is reasonable to have a default set of readers/writers. But a
> developer can override that by composing their own set and should opt in for
> say JSON and multipart etc.

+1 on this. Zero configuration is great when it is done by eliminating
unnecessary configurability; but dangerous in other cases (esp. when
done using automagic wiring).
I feel that sometimes making developers add just a single line of
explicit configuration is better than trying to automatically
determine intention. This may be one such case.

-+ Tatu +-