-
1. Re: Possible to Stream Object to user in Seam?
msduk Apr 25, 2007 8:22 PM (in response to aschneid75)I had a look arround and decided that a sevlet was the only option although I am far from an expert.
One word of advice - when you are doing your database ensure that you have your blob in a separate table. I was unable to convince hibernate to lazy load blobs. This meant a 20 line file listing was causing memory errors all over the place.
Also I had to use java.sql.Blob as the datatype - byte[] wouldnt play nicely although thats probably more likely a mysql database driver issue. -
2. Re: Possible to Stream Object to user in Seam?
jazir1979 Apr 25, 2007 8:31 PM (in response to aschneid75)
I'm using a byte[] and MySQL together and it works fine, although I did have a feeling the lazy loading is being ignored as the original poster said, but haven't tested it properly.@Lob @Basic(fetch = FetchType.LAZY) @Column(nullable = false) public byte[] getData() { return data; }
-
3. Re: Possible to Stream Object to user in Seam?
christian.bauer Apr 26, 2007 12:37 AM (in response to aschneid75)You can not lazy load a byte[] (how is this supposed to work?)
You can lazy load a byte[] if you run the bytecode instrumentation Ant task of Hibernate, after you declare FetchType.LAZY (which is a hint for the instrumentation in that case).
You can lazy load a java.sql.*lob (that's the whole point of these types).