cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Detlef Burt <the.freakaz...@gmx.net>
Subject Problem with Connection Pooling - only one connection gets used
Date Thu, 23 Apr 2009 09:09:56 GMT
Hi List,

Before I start, here's what we currently use:
Cayenne 2.0.4
MSSQL Server 2005 with jTDS Driver

In our application we define the following connection pool:
cayenne.dbcp.driverClassName=net.sourceforge.jtds.jdbc.Driver
cayenne.dbcp.url=jdbc:jtds:sqlserver://darkside:1433/mdb
cayenne.dbcp.username=dbuser
cayenne.dbcp.password=dbpassword
cayenne.dbcp.maxActive=10
cayenne.dbcp.minIdle=3
cayenne.dbcp.maxIdle=10
cayenne.dbcp.maxWait=10000

When starting the application everything works fine, we can see 3 
connections to the MSSQL Server.
The Problem is, only one of these connections is used. Because we used 
external transactions, we disabled them to let cayenne do the 
committing, but that didn't help either. The only result was, that data 
wasn't written to the database.

We also tried recreating the DataContext every time we access the 
database, nothing helped.

Neither the DBCPDataSourceFactor nor the Cayenne DriverDataSourceFactory 
return an unused connection.

So now my question is:
How does Cayenne handle the connection pool? Is there a way to always 
get an unused connection? Or at least determine why cayenne is always 
using the same connection?

Thanks,
Detlef

Mime
View raw message