users@jsr311.java.net

Re: ApplicationConfig vs. Application

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Tue, 29 Jul 2008 16:31:35 +0200

Hi Reto,

Reto Bachmann-Gmür wrote:
> Hi,
>
> I've just seen that in the latest javadoc ApplcationConfig seems to have
> been replaced with Applcation. My first impression is that it makes the
> interface less clear, harder to implement container without making it
> easier to implement applications.
>
> So I'm wondering about the rationale
> and motivation for this change.
>

We unified the methods to access to the resource classes and provider
classes and add a method to obtain resource class instances and provider
class instances (referred to as singletons).

Since a class or instance of a class can be identified as a provider
class or a root resource class from annotations on the class there is no
need for separate methods. The developer can manage them as one set and
the JAX-RS implementation can easily identify (previously identification
would be performed for validation purposes)

The addition of the singleton method is so that it is easier to provider
pre-initialized instances of resource classes or provider classes,
something that was not possible to do before.

So the approach was to simplify the interface for the developer while
enabling additional functionality.

Paul.

-- 
| ? + ? = To question
----------------\
    Paul Sandoz
         x38109
+33-4-76188109