Hi
On 01/12/11 21:18, eswarup wrote:
I'm looking for caching prior to hitting the service layer for my Jax-rs
webservice

Logic is simple..URI+query string would be key to cache, response (xml,
json, jsonp) as value to cache obj.

During pre-invoke stage, need to check if cache already exists for give URI
and return response if found.

in marshall, pre-stream stage, need to capture the result and store in
cache.

I started looking at Logging(Inout)Interceptors but seems too complicated,
and not sure if that's correct approach.

I've looked at these forums, and didn't seem to find related to it.

For JAX-RS the simplest option is to have a single bean implementing RequestHandler and ResponseHandler filters or may be a custom Invoker, see http://cxf.apache.org/docs/jax-rs-filters.html.

If you go with filters then you can get all the JAX-RS contexts injected there too which will help...

See also

http://cxf.apache.org/docs/jax-rs-advanced-features.html#JAX-RSAdvancedFeatures-Serversidecaching

HTH, Sergey


Any suggestions?

--
View this message in context: 
http://cxf.547215.n5.nabble.com/Caching-results-using-interceptor-tp5039950p5039950.html
Sent from the cxf-user mailing list archive at Nabble.com.


--
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com

Reply via email to