Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0005093 [Hessian] major always 05-28-12 23:35 05-28-12 23:50
Reporter MicW View Status public  
Assigned To
Priority normal Resolution open  
Status new   Product Version 4.0.7
Summary 0005093: Transfer of Large Binary Data not working within Objects
Description 0003655 fixes the issue for 4.0.x for the case if a method returns an InputStream:

public InputStream getDownload(String filename);

But if the Stream is contained within a result Object, all Versions of Hessian (3.1.3, 3.1.5, 4.0.7) fails:

public Download getDownload(String filename);

public class Download {
   String filename;
   InputStream data;

The exception on the client side is like in 0003655 (Stream is closed).
Additional Information
Attached Files

- Relationships

- Notes
05-28-12 23:41 stream is closed
05-28-12 23:50

If i comment out is.close() and conn.close() in HessianProxy.invoke(), it works fine (but out course resources do not get closed).
So it's a bit tricky here how to close the stream and connection. In the fist case (0003655) the Method can only return one Stream. So the connection can simply be closed if this stream is closed. In the case of Objects containing streams, the situation is more complex because it's not easy to find out, when the stream can be closed. One way woulr be to keep track of all streams and if the last stream is closed, the connection can be closed as well.
Another problem is that the result Object's properties may not be available until the stream is fully read.

- Issue History
Date Modified Username Field Change
05-28-12 23:35 MicW New Issue
05-28-12 23:41 MicW Note Added: 0005785
05-28-12 23:50 MicW Note Added: 0005786

Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
31 total queries executed.
27 unique queries executed.
Powered by Mantis Bugtracker