*
The moose likes JDBC and the fly likes How do i not read a whole blob into memory when using Abator generated DAO? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "How do i not read a whole blob into memory when using Abator generated DAO? " Watch "How do i not read a whole blob into memory when using Abator generated DAO? " New topic
Author

How do i not read a whole blob into memory when using Abator generated DAO?

Harry Brearley
Greenhorn

Joined: Feb 15, 2006
Posts: 15
Hi

I have successfully gerenated a DAO ibatos interface using Abator for Ibatis that contains a BLOB field.
I see the getter/setter methods for getting this data. My concern is that this approach seems to first read the whole BLOB into memory and then i pass it out to an outstream. The servlet is simply serving an image from the database. The files could be quite big and i could have many users in parallel. I am concerned about running out of memory.
I see in basis resultset you can use getBinaryStream on the blob and then read in and out as normal.

Can someone help me understand how to do this with Abator/Ibatis or whether in reality i will not have a problem?

thanks
/harry
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How do i not read a whole blob into memory when using Abator generated DAO?
 
Similar Threads
Compare Ibatis to Hibernate?
JVM Issue using Ibatis 2.0 and Tomcat
Ibatis through eclipse jvm heap size error
Why to use Ibatis DAO pattern
about iBatis Clob handling