Toby Hede wrote:
> I worked it out.
>
> File Transfers don't work in hessian.
>
I'm afraid this is untrue. File transfers work in hessian. Use byte arrays,
transfer blocks iteratively. Why would you expect file objects to be
automatically serialised and deserialised ? And even if you did and that turned
out not to be true, that does not mean that you can't transfer files through
hessian. A file object is according to the Javadoc "An abstract representation
of file and directory pathnames." - why would this help you transfer files it
yet a mystery.
Also look at it's serialised form:
http://java.sun.com/j2se/1.4.2/docs/api/serialized-form.html#java.io.File
Why would Hessian ever change that, and assume you want to copy files between
the parties ?!
> The fact that it did work is strange, but kind-of makes sense. I was
> testing on my dev machine and running the server locally, so the File
> handle pointed to the same location on the hard drive.
>
Exactly, and that's precisely why it shouldn't work; I don't think a protocol
should exhibit this much magic behaviour. Next thing you'll expect would be to
transfer sockets, resultsets and whatnot.
> I have actually ended up bypassing Hessian for file transfer in the end
> - we already had a mechanism for sending very large files, so I have
> used that instead (the files being sent by hessian were actually icons,
> so thought i could get away wityh it).
>
Well if it's for icons i.e. small files why don't you just open them, read them
all in, send as {String filename, byte[] data} and there you go.
> Thanks for your help though.
>
>
Regards,
-- Radu-Adrian Popescu CSA, DBA, Developer Aldrapay MD Aldratech Ltd. +40213212243
This archive was generated by hypermail 2.1.8 : Thu Sep 28 2006 - 20:16:40 PDT