getBinaryStream and OutOfMemoryException
От | Jesper Thorhauge |
---|---|
Тема | getBinaryStream and OutOfMemoryException |
Дата | |
Msg-id | 42C10723.5010702@conzentrate.com обсуждение исходный текст |
Ответы |
Re: getBinaryStream and OutOfMemoryException
|
Список | pgsql-jdbc |
Hi I have a problem when retreiving relative large files from a bytea field in the database using getBinaryStream. ResultSet res.... InputStream is = res.getBinaryStream("largefile_bytea"); causes OutOfMemoryException... setBinaryStream also used to cause this problem but seems to be fixed with the 8.0-release of the jdbc driver ( thanks!!! :-) ). Whenever i use getBinaryStream on a file of size 9mb or larger it runs out of memory. I know i can just raise jvm heap using -Xmx, but it seems to me like the streaming feature doesn't work properly. Looking into the cvs checkout from 22-05-2005, it really seems to me that getBinaryStream is nothing more than a getBytes ...?? Searching the mailing list archive didn't give me the answer, so i hope someone out there is able to provide it. My setup is; - postgresql-8.0-311.jdbc3 driver - postgresql 8.0 - jboss/tomcat using hibernate - running on windows xp with jdk 1.5.0_02-b09 Regards Jesper Thorhauge
В списке pgsql-jdbc по дате отправления: