commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Administrator <ad...@uslugodawcy-weselni.pl>
Subject [dbcp] Problem with first update statement after Tomcat restart
Date Wed, 24 Nov 2010 12:00:39 GMT
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.

Kind regards,
Remik
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
    • Unnamed multipart/related (inline, None, 0 bytes)
View raw message