users@jersey.java.net

Jersey - StreamingOutput with JAXB Beans

From: James Allchin <james_at_knowledgemill.com>
Date: Sun, 10 May 2009 15:31:09 +0100

Hi All,

I am making some good progress with Jersey and really pleased with the
framework.

As I get into more detail one of the areas I am looking at if performance...

I understand that Jersey is capable of returning StreamingOutput from a
specific method call. I have tested this with a @GET method returning
StreamingOutput.

This will be important as sometimes we are returning a huge amount of XML
and want Jersey to begin serving JAXB Beans as XML as soon as as they are
created. Perhaps it is doing this anyway? (I may need to change the way in
which I build the array of objects).

However, is there anyway to make a method stream if we are returning an
array of JAXB Bean (my own custom entities) - is this possible?

Apologies, if I have missed it in the docs...

Cheers

James