Paul Sandoz wrote:
>
> On Nov 12, 2008, at 11:15 PM, Jeremy Whitlock wrote:
>
>> And finally, what I'm proposing is a configurable way to handle these
>> situations.
>
> Agreed. You might also be interested in a blog here [2] on
> configuration. I am wondering if the JSON mapped configuration suits
> your needs more. From the feedback we have got most developers don't
> appear to like the mapped convention and prefer a more concise
> convention that is easier to consume by the JavaScript client.
>
For the actual mechanics of configuration, I had a similar need for easy
customizability in jersey-multipart, and ended up with a class that
loaded a properties resource from the classpath (if it existed, or used
default values otherwise), and then provided the mechanism to inject the
configuration bean into your providers, resources, and so on.
The mechanism here could be generalized to support arbitrary properties
on a configuration bean (using Java's reflection APIs). I'm going to
take a crack at that and see if we can provide a general facility for
easy application configuration for various services within Jersey.
> Paul.
>
Craig