Well, my question is the following: what is the difference between JAX-RS
and JSR 311
? Since I understand that it JAX-RS
is an implementation (that is, an API) of JSR 311
and JSR 311
it is the specification. But I have come across APIs (like Jersey
) that say they are implementations of JAX-RS
, and that JAX-RS
is the spec. So there is my doubt, what is each thing? And in case it's JAX-RS
not a spec, does it Jersey
take the API from JAX-RS
and extend it?
A JSR is a document that contains the technical specification of a technology. Defines the standards that must be met. It can be interpreted as defining "what", not "how".
In the case of JSR 311 , this is a specification for consuming REST services from Java, commonly known as JAX-RS. Details of the interfaces provided in JAX-RS are explained here. The implementation is not defined. Note that JSR 311 points to JAX-RS version 1.x. For version 2.x there is JSR 339 .
JAX-RS 1.x can be said to be synonymous with JSR 311, while JAX-RS 2.x is synonymous with JSR 339.
It is not like this. JAX-RS is the specification, not an implementation. Of course, it provides the definition of the necessary interfaces that the implementation must have. Implementation examples of the standard are Jersey and Apache CXF .
No, Jersey (and other implementations) take the JAX-RS definitions as part of the implementation it provides, as explained in the previous paragraphs.