users@jax-rs-spec.java.net

[jax-rs-spec users] [jsr339-experts] Re: Re: Re: Dynamic Binding Example

From: Jan Algermissen <jan.algermissen_at_nordsc.com>
Date: Wed, 7 Nov 2012 23:39:24 +0100

>>>>>
>>>>> I wonder where did you get the assumption that "for dynamic binding new instances seem to have to be created"? That's simply not true. Check the Configurable (renamed to Configuration recently) API.
>>
>>
>> The docs below is what I looked at and it caused the impression that the runtime should instantiate (for that registration() call) a dedicated instance. IOW, that there will be a single instance for each call or at least for each configurable.
>>
>>
>> Jan
>>
>> "Configurable register(Class<?> providerClass)
>> Register a provider or a feature class to be instantiated and used in the scope of the configurable instance. The registered class is registered as a provider of all the recognized JAX-RS or implementation-specific extension contracts including Feature contract.
>> As opposed to the instances registered via register(Object) method, classes registered using this method are instantiated and properly injected by the JAX-RS implementation provider. In case of a conflict between a registered feature and/or provider instance and instantiated registered class, the registered instance takes precedence and the registered class will not be instantiated in such case.
>> "
>
>
> I see now... that is clearly a wording issue in javadoc. I need to find a better wording. Could you please file a JIRA issue?

http://java.net/jira/browse/JAX_RS_SPEC-310

Jan


>
> Marek