On Aug 10, 2010, at 4:52 PM, bmraczk wrote:
> We are dealing with a large data set around 3g 4million records. Any
> ideas would help.
You will need to send more info on what you want to do.
How do you want a HTTP client to process such records. Obviously
sending 3g over the wire is not feasible so i presume the client will
be doing some form of query.
Do you want to expose each record as a URI with DB key as part of that
URI?
Is each record uniform (has same number of columns?)
Do you want to use query params to return a list of records that match
certain criteria? and do you want to page through the results to avoid
large responses?
Paul.
> I am relatively new to jersey
> This is my third application.
>
> Sent via DROID on Verizon Wireless
>
>
> -----Original message-----
> From: "Paul Sandoz-2 [via Jersey]" <[hidden email]>
> To: bmraczk <[hidden email]>
> Sent: Tue, Aug 10, 2010 14:21:34 GMT+00:00
> Subject: Re: using jaxb to stream a large data set
>
>
> On Aug 10, 2010, at 3:42 PM, bmraczk wrote:
>
> >
> > Is there an example of using streaming xml in jersey
> >
>
> There is no example with JAXB. Do you want to manage the unmarshalling
> of a large XML document in chunks binding sub-elements to a JAXB
> beans?
>
> If so it is possible with StAX, but i just realized we have an
> oversight in Jersey and it is not possible to inject an
> XmlStreamReader.
>
> But you can do this:
>
> ...
>
> @POST
> pubiic .... post(InputStream in, @Context
> Injectable<XMLInputFactory> xif) {
>
> XMLStreamReader r = xif.getValue().createXMLStreamReader(in);
>
> // loop through reader and marshall sub parts to JAXB beans
> }
>
>
> For marshalling it should be possible to do something similar
> XMLStreamWriter in conjunction with JAXB marshalling and
> StreamingOutput [1]. Just make sure you set the fragment property of
> the marshaller to true
>
> Paul.
>
> [1] https://jsr311.dev.java.net/nonav/releases/1.1/javax/ws/rs/core/StreamingOutput.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
>
> View message @ http://jersey.576304.n2.nabble.com/using-jaxb-to-stream-a-large-data-set-tp4538063p5393244.html
> To unsubscribe from Re: using jaxb to stream a large data set, click
> here.
>
>
> View this message in context: Re: using jaxb to stream a large data
> set
> Sent from the Jersey mailing list archive at Nabble.com.