users@jax-rs-spec.java.net

[jax-rs-spec users] Breaking change proposed for JAX-RS 2.0: Anyone out there implements custom javax.ws.rs.core.Request or extends javax.ws.rs.core.Response/ResponseBuilder?

From: Marek Potociar <marek.potociar_at_oracle.com>
Date: Tue, 25 Oct 2011 12:50:23 +0200

Hello all,
for JAX-RS 2.0 API we plan to add a bunch of new methods to the classes from subj. See the current API proposal here:

Request:
  http://jax-rs-spec.java.net/nonav/2.0/apidocs/javax/ws/rs/core/Request.html
  Note that the interface also extends the following new interfaces:
    http://jax-rs-spec.java.net/nonav/2.0/apidocs/javax/ws/rs/core/Headers.html
    http://jax-rs-spec.java.net/nonav/2.0/apidocs/javax/ws/rs/core/RequestHeaders.html

Response:
  http://jax-rs-spec.java.net/nonav/2.0/apidocs/javax/ws/rs/core/Response.html
  Note that the interface also extends the following new interfaces:
    http://jax-rs-spec.java.net/nonav/2.0/apidocs/javax/ws/rs/core/Headers.html
    http://jax-rs-spec.java.net/nonav/2.0/apidocs/javax/ws/rs/core/ResponseHeaders.html

ResponseBuilder:
  http://jax-rs-spec.java.net/nonav/2.0/apidocs/javax/ws/rs/core/Response.ResponseBuilder.html
  Note that the interface also extends the following new interfaces:
    http://jax-rs-spec.java.net/nonav/2.0/apidocs/javax/ws/rs/core/Headers.html
    http://jax-rs-spec.java.net/nonav/2.0/apidocs/javax/ws/rs/core/Headers.Builder.html
    http://jax-rs-spec.java.net/nonav/2.0/apidocs/javax/ws/rs/core/ResponseHeaders.html
    http://jax-rs-spec.java.net/nonav/2.0/apidocs/javax/ws/rs/core/ResponseHeaders.Builder.html

This is done in order to support the planned common Filters & Handlers[1] API as well as the planned JAX-RS Client
API[2] without introducing yet another set of Request/Response components into the existing API.

We understand that the proposed change breaks backward compatibility in general. Although we expect the impact to be
limited to the JAX-RS implementation providers (which is ok), we are still looking for any application-level use cases
in which JAX-RS users might have provided a custom implementations of the above-mentioned components.

Please let us know in case you provided a custom implementation of any of the components above in your project or
application. Please also include the description of your use case so that we can better understand and asses the reasons
that lead to providing a custom implementation of those components.

Your information will help us to come up with a final solution that would minimize the potential impact of this breaking
change. Many thanks in advance for your help.

Kind regards,

Marek Potociar, Santiago Pericas-Geertsen
JAX-RS 2.0 (JSR-339) Specification Leads


[1] http://java.net/projects/jax-rs-spec/pages/InterceptorsAndFilters
[2] http://jax-rs-spec.java.net/nonav/2.0/apidocs/javax/ws/rs/client/package-summary.html