Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jaxrs-dev] Clarification regarding Application subclass instantiation

On Sun, Feb 24, 2019 at 10:04 PM Markus KARG <markus@xxxxxxxxxxxxxxx> wrote:

The specification uses the words "Implementations" and "Products" differently. "Implementations" of the API means "CXF, Jersey, RESTEasy, …" while "Products" mean "GlassFish, Payara, WebSphere, …".


I agree.
 

>For the record I see this as:

>"product" == Glassfish or some other application server or integration environment inside of which a JAX-RS implementation might find itself

>"implementation" == Jersey or another implementation of the JAX-RS specification

 

Correct.

 

>Then it becomes very clear, and could be rewritten equivalently like this:

>When integrated in Glassfish, or any other product that supports CDI, Jersey or any other JAX-RS implementation MUST support the use of CDI-style Beans as root resource classes, providers and Application subclasses.

 

We cannot rewrite it literally like that because the specification is product- and vendor-neutral. But yes, this is what it means.


Right.
 

Note that it does not automatically imply anything to the application programmer (he still can decide to NOT use or support CDI), nor that Jersey must support CDI outside of GlassFish.


Here is where we disagree.  The English is very clear on this point.  I'll quote section 11.2.3 again to maximize its clarity:

"In a product that supports CDI, implementations MUST support the use of CDI-style Beans as root resource classes, providers and Application subclasses."

As you've just stated, a "product that supports CDI" is "GlassFish, Payara, WebSphere, …".

And as you've just stated "implementation" means "CXF, Jersey, RESTEasy, …".

So "in a product that supports CDI" ("GlassFish, Payara, WebSphere, …"), an implementation ("CXF, Jersey, RESTEasy, …") "MUST support the use of CDI-style Beans as root resource classes providers and Application subclasses."  I've got my answer; thanks!

Thanks,
Best,
Laird

Back to the top