Re: [SPAM] - Re: [SPAM] - Re: JDBC HighLoad - Found word(s)

Поиск
Список
Период
Сортировка
От Dave Cramer
Тема Re: [SPAM] - Re: [SPAM] - Re: JDBC HighLoad - Found word(s)
Дата
Msg-id 42037A51.1020306@fastcrypt.com
обсуждение исходный текст
Ответ на Re: [SPAM] - Re: [SPAM] - Re: JDBC HighLoad - Found word(s)  (Stéphane RIFF <stephane.riff@cerene.fr>)
Ответы Re: [SPAM] - Re: [SPAM] - Re: JDBC HighLoad - Found word(s)  (Stéphane RIFF <stephane.riff@cerene.fr>)
Список pgsql-jdbc
Stephane,

Yes, that is true, but where do you get the connection from on the next
iteration of the loop ? The constructor of SQLoader.... so the next loop
it is gone.

Dave

Stéphane RIFF wrote:

> I thought that the m_conn.close() released the connection to the pool
> doesn't it ?
> If i close the connection at the end of the loop byt a
> SQLoader.close() this will
> make one connection for each thread. I want each thread ask a
> connection to the pool
> and released it after each update.
>
> Thanks for your time
> Bye
>
> Kris Jurka wrote:
>
>> 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
>>
>> ---------------------------(end of broadcast)---------------------------
>> TIP 8: explain analyze is your friend
>>
>>
>>
>>
>
>
>

--
Dave Cramer
http://www.postgresintl.com
519 939 0336
ICQ#14675561


В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Stéphane RIFF
Дата:
Сообщение: Re: [SPAM] - Re: [SPAM] - Re: JDBC HighLoad - Found word(s)
Следующее
От: Stéphane RIFF
Дата:
Сообщение: Re: [SPAM] - Re: [SPAM] - Re: JDBC HighLoad - Found word(s)