users@jersey.java.net

Re: [Jersey] using jaxb to stream a large data set

From: Tatu Saloranta <tsaloranta_at_gmail.com>
Date: Tue, 9 Feb 2010 13:05:31 -0800

On Tue, Feb 9, 2010 at 10:01 AM, Moiz Dohadwala <mdohadwala_at_mokafive.com> wrote:
> I could. However, I prefer to reuse the current jaxb beans that I am using for the paginated ui reports. The ui reports have filters. The download option needs to apply the same filters. So, it is essentially the same code as the UI reports but without paging. So I need to enable/handle streaming in that case.

Keep in mind that there is difference between using JAXB annotations
(which Jackson can use for configuration alongside its own
annotations), and JAXB the framework.
It sounds like former might work for you, so it is worth considering.
JAXB framework can be used with fragments, but that does force use of
mapped conventions (badgerfish or equivalent) which has its own
problems.

Jackson can do streaming as well as JAXB/Stax (partly because its
internal design is similar: low-level parser/generator, data binder as
separate layer), so the general method for doing this is similar.

-+ Tatu +-