JAX-RS and JSR 311

1

Well my question is this: what is the difference between JAX-RS and JSR 311 ? Since I understand that JAX-RS is an implementation (that is, an API) of JSR 311 and JSR 311 is the specification. But I have found APIs (like Jersey ) that say they are implementations of JAX-RS , and that JAX-RS is the specification. So there is my doubt, what is everything? And in case that JAX-RS is not a specification, does Jersey take the API of JAX-RS and extend it?

    
asked by Augusto Herbel 24.08.2016 в 18:46
source

1 answer

2
  

What is the difference between JAX-RS and JSR 311?

A JSR is a document that contains the technical specification of a technology. Define the standards that must be met. It can be interpreted as the definition of "what", not "how".

For the case of JSR 311 , this is a service consumption specification REST from Java, commonly known as JAX-RS. Here the details of the interfaces provided in JAX-RS are explained. The implementation is not defined. It should be noted that the JSR 311 points to JAX-RS version 1.x. For version 2.x there is the JSR 339 .

It can be said that JAX-RS 1.x is synonymous with JSR 311, while JAX-RS 2.x is synonymous with JSR 339.

  

I understand that JAX-RS is an implementation ...

It's not like that. JAX-RS is the specification, it is not an implementation. Of course, it provides the definition of the necessary interfaces that the implementation should have. Examples of implementation of the standard are Jersey and Apache CXF .

  

Does Jersey take the JAX-RS API and extend it?

No, Jersey (and other implementations) take the JAX-RS definitions as part of the implementation it provides, as explained in previous paragraphs.

    
answered by 24.08.2016 / 19:04
source