also, may be the info at
https://cxf.apache.org/docs/jax-rs-advanced-features.html#JAX-RSAdvancedFeatures-Server-sidecaching

can help.

HTTP Range, I wonder, can it help at all ? We stopped short of supporting it but if you are interested then please experiment and we can push some code to CXF...

Sergey

On 04/03/14 21:26, Sergey Beryozkin wrote:
Hi
On 04/03/14 19:08, rodgersh wrote:
Hello -

I am implementing caching for my project whereby I cache a large file to
disk (from an InputStream) while simultaneously writing the same
InputStream's contents to a PipedOutputStream (I'm doing this with
Apache's
TeeInputStream). This caching is done in its own thread.

That PipedOutputStream is connected to a PipedInputStream which is
returned
to my JAXRS REST service to use to create a response. I have set the
PipedInputStream's internal circular buffer to a size of 1 MB. I can
verify
that I am reading 1 MB from the TeeInputStream, but the PipedInputStream
appears to be read in 2Kb chunks, thus "throttling" my caching.

Is there some internal buffer size in CXF JAXRS that is limiting the
amount
of data read from an InputStream when forming the REST Response? If
so, is
the buffer size configurable?
Not really, CXF does not limit the buffer size internally. You might be
able to control it somehow with the container specific handlers.

Can you experiment with JAX-RS StreamingOutput, may be it will let you
avoid using piped streams along the way too ?

Cheers, Sergey


Thanks -

Hugh



--
View this message in context:
http://cxf.547215.n5.nabble.com/Buffer-size-on-jaxrs-response-input-stream-tp5740812.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