logo       


Re: JDBC driver's (non-)handling of InputStream:s: msg#00145

Subject: Re: JDBC driver's (non-)handling of InputStream:s
Peter,

It would be great if you could supply a test case which exhibits this
behaviour.

Dave
On Mon, 2004-03-29 at 20:10, Peter Schuller wrote:
> Hello,
> 
> Tonight I rewrote a part of an application that deals with http uploads, 
> because it turned out it has to handle larger files than originally intended 
> - and one was getting OutOfMemory errors. 
> 
> So I rewrote evcerything so that an InputStream is passed to the JDBC driver 
> and the files are never completely loaded into memory. However I am still 
> getting an OutOfMemory error for large files. While it is difficult to 
> pinpoint exactly where due to the lack of a stack trace, it does look like 
> the driver is causing it.
> 
> Does the JDBC driver handle InputStream:s intelligently at all? If so, does 
> it 
> do so under all circumstances? In this case I am putting data into a column 
> of type 'bytea' and am using PreparedStatement.setBinaryStream().
> 
> The backend is PostgreSQL 7.4.1, and I am using the driver for 7.4.1 
> (pg74.1jdbc3.jar). Running under JDK 1.4.2.
> 
> Do I need to use some other type in the database in order for input streams 
> to 
> be handled properly? Do I have to use some PostgreSQL specific API? Does the 
> JDBC driver need to be changed to support this?
> 
> I can always fall back to using files on the filesystem, but then I will 
> loose 
> all the niceties that come with ACID transactions which I automatically get 
> if I keep it all in the database.
> 
> Thanks!
-- 
Dave Cramer
519 939 0336
ICQ # 14675561


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

               http://archives.postgresql.org



Ruby Jobs
Java Jobs
Jobs in California
more...
what
job title, keywords
where
city, state, zip
jobs by job search
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
encryption.gpg....    ietf.rfc822/199...    freebsd.devel.i...    lang.haskell.li...    mail.squirrelma...    web.zope.plone....    yellowdog.gener...    text.xml.xalan....    recreation.phot...    kde.devel.educa...    hardware.bus.ca...    printing.ghosts...    voip.peering/20...    assembly/2006-0...    org.user-groups...    culture.interne...    network.i2p/200...    boot-loaders.ya...    xfree86.render/...    qnx.openqnx.dev...    jakarta.velocit...    user-groups.pal...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe