[jax-rs-spec users] [jsr339-experts] Re: client filter issue

From: Bill Burke <>
Date: Thu, 16 Feb 2012 08:55:45 -0500

On 2/16/12 5:09 AM, Marek Potociar wrote:
> On Tue 14 Feb 2012 05:56:26 PM CET, Bill Burke wrote:
>> We have a client cache implementation built on Resteasy interceptor architecture. One thing it does do is cache the
>> representation and not the unmarshalled entity. In other words, it caches an XML/JSON document, and not the JAXB,
>> Java object its unmarshalled to. The application code can then unmarshal the cached bits into anything it wants.
>> Right now, there is no way to portable way to implement that feature other than to create a implementation of Response
>> which is very non-trivial and something, IMO, we shouldn't force the user to do.
>> Following me?
> Not quite :) Why is it not possible to use one of the standard static
> factory methods on the JAX-RS Response to produce a copy of the
> original response? I reviewed and updated the client-side cache example:

Ok, then this means InputStream is a special case, right? That if you
do builder.entity( inputStream), then you can extract/unmarshall from it
with a readEntity(). This needs to be documented.


Bill Burke
JBoss, a division of Red Hat