commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Administrator <ad...@uslugodawcy-weselni.pl>
Subject Re: [dbcp] Problem with first update statement after Tomcat restart
Date Wed, 24 Nov 2010 23:24:24 GMT
Hi Phil,

Thank you for your kind reply.

When I started preparing code snippets to send back to you, I came across  
a suspicious section in my code.

After a bit of analysis it turned out that it's a thread synchronization  
issue - nothing to do with DBCP.

I fixed the problem and DBCP seems working fine for me now.

Thank you for pointing me into right direction.

Regards,
Remik



On Wed, 24 Nov 2010 18:39:40 +0100, Phil Steitz <phil.steitz@gmail.com>  
wrote:

> 2010/11/24 Administrator <admin@uslugodawcy-weselni.pl>
>
>> Hi gurus,
>>
>> Every time I restart Tomcat, the first transaction trying to modify data
>> gets stuck in "in transaction" state.
>>
>> I'm running the following configuration on Gentoo:
>>
>> Postgresql 8.4.4
>> Apache Tomcat/6.0.18
>> JVM: 1.6.0_13-b03
>> commons-dbcp-1.4
>> commons-pool-1.5.5
>>
>> This is how I configured my connection pool:
>>
>>
>> <Context>
>>
>> <Resource name="jdbc/weddingDataSource"
>> auth="Container"
>> type="javax.sql.DataSource"
>> factory="org.apache.commons.dbcp.BasicDataSourceFactory"
>> driverClassName="org.postgresql.Driver"
>> url="jdbc:postgresql://127.0.0.1:5432/myApplication"
>> username="user" password="password"
>>
>> maxActive="-1"
>> maxIdle="20"
>> maxWait="10000"
>> removeAbandoned="true"
>> removeAbandonedTimeout="6"
>> logAbandoned="true"
>> initialSize="20"
>> validationQuery="select 1"/>
>>
>> </Context>
>>
>>
>> It's enough to close this faulty browser session or to kill the stuck
>> process and from then on things seem to work fine.
>>
>> Any help would be much appreciated.
>>
>
>
> Can you post the code that is acquiring and using the connection that is
> attempting the update?
>
> Phil
>
>>
>> Kind regards,
>> Remik
>>


-- 
Using Opera's revolutionary email client: http://www.opera.com/mail/

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


Mime
View raw message