cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Muller, Anthony" <anthony.mul...@sap.com>
Subject RE: JAX-RS - ZIP compression ?
Date Thu, 20 Sep 2012 11:23:17 GMT
-> If GZIP is acceptable then the simples option is to add 
-> @org.apache.cxf.annotation.GZIP to a root resource class.

Just to be sure, in this case, after adding this annotation:
- all subresources class will be configured as well or I have to add this annotation too?
- must I add a "application/x-gzip" MIME type on JAX-RS methods?

Regards,
Anthony

-----Original Message-----
From: Muller, Anthony [mailto:anthony.muller@sap.com] 
Sent: jeudi 20 septembre 2012 13:09
To: Sergey Beryozkin; users@cxf.apache.org
Subject: RE: JAX-RS - ZIP compression ?

Thanks Sergey, I will look at this asap :)

Regards,
Anthony

PS: about this point, we choose to have an interceptor mechanism at application level to handle
lock/unlock on resources when necessary. Thanks!

-----Original Message-----
From: Sergey Beryozkin [mailto:sberyozkin@gmail.com] 
Sent: mardi 18 septembre 2012 22:57
To: users@cxf.apache.org
Cc: Muller, Anthony
Subject: Re: JAX-RS - ZIP compression ?

Hi Anthony
On 18/09/12 21:36, Muller, Anthony wrote:
> Hello Sergey,
>
> Is there an (easy) way to accept/activate ZIP compression of REST responses?
>
If GZIP is acceptable then the simples option is to add 
@org.apache.cxf.annotation.GZIP to a root resource class.

We also have a utility for supporting Deflate [1] encoding which I guess 
is somewhat different to GZIP:

http://docs.oracle.com/javase/7/docs/api/java/util/zip/Deflater.html

The actual utility is in the rs xml security module - but if it were of 
interest then we'd make it available at the common rt/core level, let us 
know...

Cheers, Sergey

> Thanks,
> Anthony
>

P.S By the way, recall our conversation about making sure that a custom 
ResponseHandler is invoked even if the exception is thrown from the 
server application code, I can't seem to find that thread, but the thing 
which I forgot to mention last time was that providing a custom 
ExceptionMapper for Throwable would guarantee a Response would be avail 
for response filters no matter what


Mime
View raw message