commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbre...@wi.rr.com (Jeffrey D. Brekke)
Subject Re: FTPClient within Oracle RDBMS problem
Date Wed, 26 May 2004 12:42:15 GMT
>>>>> On Wed, 26 May 2004 11:22:44 +0200, Thomas Stiegler <tstiegler@kn-info.de>
said:

[SNIPPED]

> InputStream is = fc.retrieveFileStream(sFile); if (logReply() >=
> 500) return -1; if (is == null) return -1;

> long lStart = System.currentTimeMillis(); int iBytesRead;
> while((iBytesRead = is.read(b, 0, 4000)) > -1) { pstmt.setInt(1,
> iID); pstmt.setInt(2, iSeq++); pstmt.setString(3, new String(b, 0,
> iBytesRead)); pstmt.executeUpdate(); iBytes += iBytesRead;
> }
> pstmt.close(); is.close(); fc.completePendingCommand(); if
> (logReply() >= 500) return -1; return iID;
> }
> }

I thought the completePendingCommand() should be done before the
closes, definitly before the is.close() call.

-- 
=====================================================================
Jeffrey D. Brekke                                   jbrekke@wi.rr.com
Wisconsin,  USA                                     brekke@apache.org
                                                    ekkerbj@yahoo.com


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message