users@jax-rs-spec.java.net

[jax-rs-spec users] [jsr339-experts] Re: Re: Application class questions

From: Marek Potociar <marek.potociar_at_oracle.com>
Date: Wed, 22 Aug 2012 11:36:32 +0200

On Aug 21, 2012, at 7:42 PM, Bill Burke <bburke_at_redhat.com> wrote:

>
>
> On 8/21/2012 9:51 AM, Marek Potociar wrote:
>>
>> On Aug 20, 2012, at 6:50 PM, Bill Burke <bburke_at_redhat.com> wrote:
>>
>>> I have a few questions on the Application class:
>>>
>>> * Can you have more than one in one WAR?
>>
>> I'd say yes.
>>
>>> * Do they share providers? Or are their providers separate and applicable only to the resources that are deployed by that Application class?
>>
>> I'd say it depends whether or not package scanning kicks in. And even then the provider instances would not be shared IMO.
>>
>>>
>>> Neither of these are covered in the spec as far as I can tell.
>>
>> If this is something that needs to be clarified in the spec, then please file a Jira issue.
>>
>
> I couldn't find anything. We actually assumed that there could only be one Application per war, but it seems Jersey and others allow more than one.
>
Just to explain why we do what we do:
The servlet-based deployment of JAX-RS application is bound to a single servlet that serves the app. Since a single web app may contain multiple servlets, support for multiple JAX-RS apps in a single web app is naturally derived from there.

Marek

>
> --
> Bill Burke
> JBoss, a division of Red Hat
> http://bill.burkecentral.com