Paul Sandoz wrote:
> Hi,
>
> Injection of @HttpContext or @Resource stuff is now supported on message
> body readers/writers. So it is now possible to inject, say UriInfo, like
> one can on a resource class.
>
> Readers/writers are instantiated within the scope of the web application
> (previously they were statically scoped per the class loader).
>
> Next up: scan for readers/writers like we scan for resource classes,
> thus META-INF services will no longer be required for registration.
>
Done, in latest build. See the EntityProvider example for more details.
Note that if a class implements both MessageBodyReader and
MessageBodyWriter only one instance will be created. Previously when a
class was declared in two the related META-INF/services files two
instances would be created.
You can still use META-INF/services if you wish but i don't recommend it.
The ResourceConfig implementation has been modified to include a method
to get provider classes so you can supply your providers directly as you
can root resource classes if you wish. The scanning resource config
impls will pick up provider classes automatically.
Paul.
> After that: support a JAXB context resolver, one or more of which may be
> implemented by the application, and an aggregation can be injected onto
> a reader/writer or resource class. This will enable the application to
> declare JAXB contexts.
>
> And after that: enable deferring instantiation of readers/writers/jaxb
> resolvers/resource config etc to an IoC framework.
>
> Paul.
--
| ? + ? = To question
----------------\
Paul Sandoz
x38109
+33-4-76188109