jsr339-experts@jax-rs-spec.java.net

[jsr339-experts] Re: provider discovery

From: Marek Potociar <marek.potociar_at_oracle.com>
Date: Fri, 10 Jun 2011 17:33:17 +0200

IMHO, this is a good intention, but the actual implementation is a terrible misuse of the Java Service Provider
discovery mechanism (or API, if you want)[1], unless the class names in the file identify *ONLY* concrete
implementations of javax.ws.rs.ext.Providers interface.Jersey does not support this.

Anyway, as I say, the idea is *GOOD*, we just may need to find a better way how to implement it. Feel free to add a new
issue to track this.

Marek

[1] http://download.oracle.com/javase/6/docs/technotes/guides/jar/jar.html#Service%20Provider

On 06/09/2011 10:09 PM, Bill Burke wrote:
> I think Jersey has this too, but Resteasy allows you to specify a simple text file in
>
> META-INF/services/javax.ws.rs.ext.Providers
>
> This file lists a set of provider classes to automatically register. Jax-rs runtime finds these files by doing a
> getResources() on the classloader.
>
> While this feature isn't as important in an application server, it does matter for a client API which may not be running
> within an application server. (I think JPA does something similar for finding persistence.xml files).
>
> Bill
>
>