Re: [SPAM] - Re: [SPAM] - Re: JDBC HighLoad - Found word(s) - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: [SPAM] - Re: [SPAM] - Re: JDBC HighLoad - Found word(s)
Date
Msg-id Pine.BSO.4.56.0502040313510.15448@leary.csoft.net
Whole thread Raw
In response to Re: [SPAM] - Re: [SPAM] - Re: JDBC HighLoad - Found word(s)  (Stéphane RIFF <stephane.riff@cerene.fr>)
Responses Re: [SPAM] - Re: [SPAM] - Re: JDBC HighLoad - Found word(s)
List pgsql-jdbc

On Fri, 4 Feb 2005, [ISO-8859-1] St�phane RIFF wrote:

> Hello,
> I implement like you said in the last post but now i get some errors
> like this :
>
> 2005-02-04 09:03:26,234 : [WARN] SQLoader - java.sql.SQLException:
> org.apache.commons.dbcp.DelegatingPreparedStatement is closed.
> I attach the two class i you want to see
>

Your main loop is written:

SQLoader sl = new SQLoader();
for(int i=0;i<100;i++) {
    sl.saveTrame( ... );
}

but the end of the saveTrame method you have:

finally {
    try {
        m_conn.commit();
        m_conn.close();

This closes the connection on the first iteration of the loop.  I'd
suggest something like adding SQLoader.close() which gets called at the
end of the for loop.

Kris Jurka

pgsql-jdbc by date:

Previous
From: Stéphane RIFF
Date:
Subject: Re: [SPAM] - Re: [SPAM] - Re: JDBC HighLoad - Found word(s)
Next
From: Oliver Siegmar
Date:
Subject: Re: Problems with infinity