1 Reply Latest reply on May 20, 2002 6:46 AM by Jeroen Gremmen

    Passing URL objects to a session bean

    Jeroen Gremmen Newbie


      I would like to know what's the best way to stream data from my client (let's say a servlet) to a session bean.
      I cannot use InputStream as it is not serializable and that makes sense. Nevertheless I would like to specify a resource on the client side and read it in my session bean. Does JBoss or the EJB spec (I haven't found it yet) provide a way to do the job?



        • 1. Re: Passing URL objects to a session bean
          Jeroen Gremmen Newbie


          Since nobody seems to be able to aswer my question I tried several methods but until now.... nothing useful.

          What exactly does JBoss do when I call a methd in the remote interface with, let's say, 2 parameters. Are these 2 parameters serialized and then streamed to the EJB container or is it more like a socket to socket connection on which objects are serialized from one side to the other. (Please forgive me but I have no idea how this is implemented)

          The reason I ask is: what if I read from a inputstream on serialization and send the contents of the inputstream in chunks of approx. 256 bytes to the objectstream. After each chunk I could flush the stream to make sure the data is actually send to the stream. The deserialization then simply reads the 256 byte chunks and builds a byte[]. If such a thing works then I'm a happy man!

          Please comment on this.