users@jersey.java.net

Re: [Jersey] why does jersey-core 1.4 contain all of jsr311?

From: Ittay Dror <ittay.dror_at_gmail.com>
Date: Thu, 28 Oct 2010 18:15:43 +0200

Paul Sandoz wrote:
>
> On Oct 28, 2010, at 3:11 PM, Ittay Dror wrote:
>
>>
>>
>> Paul Sandoz wrote:
>>>
>>> On Oct 28, 2010, at 2:37 PM, Ittay Dror wrote:
>>>
>>>>
>>>>
>>>> Paul Sandoz wrote:
>>>>> Hi Ittay,
>>>>>
>>>>> jersey-core bundles the 311 classes so we can work effectively with OSGi for multiple versions of Jersey.
>>>>
>>>> multiple versions of jersey should import different package versions of jsr311.
>>>>
>>>
>>> Jersey 1.3 and Jersey 1.4 implement JAX-RS 1.1, its not feasible for every release of Jersey to have a different release of 1.1. Ideally we would have separate bundles but the way the JAX-RS RuntimeDelegate works it is actually rather tricky for it to determine and obtain the correct implementation from the appropriate Jersey jar if they are separate.
>> so maybe create a jersey-core-1.4-osgi instead of doing that for everybody?
>>
>
> We wanted to different jars for different platforms we can can avoid it.
>
>
>>>
>>>
>>>>>
>>>>> So in your environment it is no longer necessary to include the 311 jar at runtime, are you doing that?
>>>> i have an environment similar to OSGi. the trouble is that now when Jersey sees a @Path, it is not the same @Path as other jars since they come from different class loaders
>>>>
>>>
>>> But do you need to include the 311 jar in that environment?
>> yes, i want to annotate classes with @Path without depending on jersey-core.
>
> Why do you need the 311 jar at runtime?

it contains all the jax-rs annotations, e.g @Path. I annotate my classes which means @Path is resolved by one class loader, and jersey uses these annotations also which means they are resolved in its class loader. So from the JVM point of view these two @Path annotations are different entities.
>
> Paul.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>