Tim,

I have done this. (Sort of)

Here is what I did.

Entity bean A is has a very large field (a);

Session bean B has a method called getBytes that allows access to field 'A.a' a
piece at a time.

This allows you to pseudo-stream the large field to the client.

B.getBytes is implemented by providing a start, and offset value and reading the
bytes just like you would a stream.

This also provides a way to keep track of the size of the field, and how much
you have read. which is handing for providing feedback to the user in the form
of a progress bar or a percentage feedback.

Of course you can also do this in reverse for putting bytes into the field.

Good day!
Russ
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Tim Endres
> Sent: Wednesday, November 29, 2000 11:25 PM
> To: Orion-Interest
> Subject: RE: How can I use an BLOB datatype
>
>
> Gernalizing this one step further. We have a situation where
> we want to place large ( larger than 10MB ) into the DB. Thus,
> when I get or store I would really like to have an InputStream
> or OutputStream to read or write the "object". However, it does
> not appear that EJB really supports this. Has anyone build an
> entity bean (or session for that matter) that can stream large
> amounts of data into and out of the database? How?
>
> Thanks,
> tim.
>
> > In CMP, the output streams should be created for you.
> > The database config xml file should provide a mapping
> > of a Serializable object to a BLOB/Image/etc.  If
> > this is done, the object will be serialized before
> > insertion automatically.
> >
> > -tim
> >
>
>
>


Reply via email to