On Wednesday 13 February 2002 01:36, you wrote:
> Two things come to mind here.  First, values passed over local
> interfaces don't have to be serializable. Second, EJBs are forbidden
> from performing IO, because IO can block forever (you can cheat of
> course).  How are you planning on getting this into the database?  You
> can't create a CMP field of type Stream.
>
> -dain

There is a java.sql.Blob type that allows you to read/write binary data 
from/to a BLOB field via InputStream/OutputStream without buffering the whole 
chunk and to read/write parts of the BLOB field.

Daniel probably wants to solve the problem of transporting a big chunk of 
data from the client to the server and store this into a BLOB field in the 
database.

What I would probably do in this case is something like that:

1. Open a transaction on the client side
2. Organize big data into byte[] packets of some length and send them to the 
server via multiple calls to EJB. On the server side write each packet into 
the appropriate offset of the BLOB field via java.sql.Blob type.
3. Commit transaction on the client side.

Peter

>
> Paul Cody wrote:
> > The notion of a serializable stream is not trivial.  At first glance, it
> > suggests that your design may need reconsideration.  Can you expand on
> > your overall requirements and the properties you expect from a
> > serializable stream?
> >
> > Paul
> >
> >>-----Original Message-----
> >>From: Daniel Bruce Lynes [mailto:[EMAIL PROTECTED]]
> >>Sent: Tuesday, February 12, 2002 2:56 PM
> >>To: [EMAIL PROTECTED]
> >>Subject: [JBoss-user] Streams
> >>
> >>
> >>I'm curious if there's any way I can get streams to work as a
> >>parameter to an
> >>EJB call.  I've looked through the java.io package, to no
> >>avail, trying to
> >>find a serializable stream.  Is there perhaps a third party source of
> >>serializable streams (open source, preferably)?  Or, is the
> >>only way I'm
> >>going to be able to stream data to the database, is through
> >>the use of a
> >>servlet communicating directly with the database?  This is
> >>for files that
> >>might be as large as 20 megabytes for receiving from Tomcat,
> >>and sending back
> >>to Tomcat.
> >>
> >>Thanks in advance.
> >>
> >>_______________________________________________
> >>JBoss-user mailing list
> >>[EMAIL PROTECTED]
> >>https://lists.sourceforge.net/lists/listinfo/jboss-user
> >
> > _______________________________________________
> > JBoss-user mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/jboss-user
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to