Hi Henner,
thanks for the answer. Actually I think that this issue isn't a case of Oracle, it's more about a "new" blob handling (different to classic one) in the jdbforms. As far as I have understood from the code, the main difference is (de)serialization, so the new mode does not use FileHolder object anymore and therefore must use some blob interceptors in order to capture the file name (mainly for the latter use of FileServlet, right?).
However, in the org.dbforms.servlets.FileServlet that mode is distinguished depending on fileName:
private void readDbFieldBlob(..) { <...> // classic mode if (fileName == null) { ObjectInputStream ois = new ObjectInputStream(blob.getBinaryStream());
FileHolder fh = (FileHolder) ois.readObject();
writeToClient(
request,
response,
fh.getFileName(),
fh.getInputStreamFromBuffer());
}
// new mode
else {
writeToClient(request, response, fileName, blob.getBinaryStream());
}
<...>
}
What is more, in the org.dbforms.config.FieldValue class, there is still a constant reference to the FileHolder object:
case FieldTypes.BLOB : res = getFileHolder(); break;
As I wrote before, my intention is to have a working "new" blob handling mode. Currently db:textAreaForBlobs does not work due to the reasons stated above. I've already made a patch for db:blobContent tag, but as the jdbforms cvs server is down at the moment, I will provide the diff later.
Another issue, which is quite a rare one - I want the same blob column in the database to be handled with the textarea or file tag regarding to some property in the same table. So generaly I need to solve the following problems:
1) make the correct handling of new Blob handling mode (get rid of FileHolder object).
2) make db:textArea (or/and db:textAreaForBlobs) tag work for Blobs (only those handled in new mode or in the classic too?).
3) make the same methods and logic work for blobs irregarding of how they were submitted in the form (db:file or db:textArea tag).
4) currently org.dbforms.event.BlobInterceptor code does not care about the mime type (size and possibly some other properties) of the uploaded file, so this should be somehow fixed too.
I would like to receive some information about the concepts or vision of blob handlings in general, so I it would be easier for me to provide the correct patches.
Sorry for possible logical mistakes - jdbforms are too big to get the flavour in a week or two :)
Dziugas
Henner Kollmann wrote:
Sorry i never worked with blob streams and Oracle! Feel free to debug and change the source (and send it back to the list)!
Help is welcomed!
Cheers, Henner
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
DbForms Mailing List
http://www.wap-force.net/dbforms