You're not managing your Hibernate sessions properly.  You need to
make sure you close it (which will close the db connection too or at
least return it to the pool).  However, I would look into using
declarative transaction management if you're using Spring.  The
transaction management code will take care of opening/closing the
session for you.

On Mon, Jul 28, 2008 at 11:23 AM, Stanimir Komitov
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> Why every time when I call HibernateDaoSupport
> Session.().createSQLQuery(...)... and the SharedPoolDataSource makes new
> one active connection, and never close it, then my maxActive
> connections expired and throws the exception 'Timeout waiting for idle
> object'?
>
> My configuration parameters are those:
>
> driver=org.postgresql.Driver
> url=jdbc:postgresql://xxx.xxx.xxx.xxx/xxx
> user=xxxxxxx
> password=xxxxxx
> maxActive=10
> maxIdle=8
> maxWait=2000
> testOnBorrow=true
> validationQuery=select 1
> timeBetweenEvictionRunsMillis=300000
>
> but when I`m using HibernateTemplate in the same HibernateDaoSupport the
> connections are managed fine and the maxActive connections did not expired!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to