- Weinan Li
> On 10 May 2017, at 8:32 PM, Pavol Loffay <ploffay@redhat.com> wrote:
>
> Hello,
>
> We are working on OpenTracing jax-rs integration [1]. OpenTracing jax-rs provider [2] can be configured with various settings (tracer instance, span decorators, priority..), but also a default configuration with a parameterless constructor is possible.
>
> How should be the provider implemented when we want to allow auto-discovery with a default configuration and also a custom configuration? Currently, the problem is when users want to use a provider with custom configuration a provider with a default configuration is registered too.
I guess the implementation will be vendor specific. For example, you need to hack into RESTEasy provider loading process to achieve the goal.
In addition, could you please provide a sample project to demonstrate the current use case?
> We want only one to be registered, The default auto-discovered provider should not be used when one is explicitly registered (with a custom configuration).
>
> We are thinking about creating a separate artifact with just one class annotated with @Provider to be used when users want to use a default configuration with auto-discovery. The original artifact would be used only for a custom configuration and registration.
>
>
> [1]: https://github.com/opentracing-contrib/java-jaxrs
> [2]: https://github.com/opentracing-contrib/java- jaxrs/blob/master/opentracing- jaxrs2/src/main/java/io/ opentracing/contrib/jaxrs2/ server/ ServerTracingDynamicFeature. java#L23
>
> Regards,
>
> --
> PAVOL LOFFAY
> Red Hat Česká republika
> Purkyňova 111 TPB-B 612 45 Brno
> M: +421948286055
>
>
> _______________________________________________
> resteasy mailing list
> resteasy@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/resteasy