Gili wrote:
> Paul Sandoz wrote:
>
>> I like the idea of general support for configuration using a Java class.
>>
>> If say there was a property name:
>>
>> com.sun.jersey.multipart.config
>>
>> whose value was an instance or a fully qualified class name that is
>> the class of the instance then it would be very easy to inject such an
>> instance.
>>
>> @JerseyProperty("com.sun.jersey.multipart.config") MailConfig cg;
>>
>> Or perhaps define the property name on the MailConfig class instead.
>>
>>
>
> Alternatively, would this work? Let the MessageReader/Writer expects a
> MailConfig in its constructor and that instance gets injected by Jersey,
> Guice or anything else. This approach wouldn't require an explicit property.
>
Paul, the InjectableProvider stuff[1] in Jersey would support this,
right? If so, I don't really like the fact that
ResourceContext is defined in jersey-server (not jersey-core) so it
would need to be included even on a client application ... but IIRC
there are some other things that currently require that also.
Craig
[1]
http://blogs.sun.com/sandoz/entry/parameter_beans