ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clinton Begin <clinton.be...@gmail.com>
Subject Re: IBATIS-496: indefinite wait in Throttle.increment()
Date Tue, 30 Jun 2009 13:14:41 GMT
No, you don't have to use start/commit/end with selects -- but it is faster
and will give you more reliable data if you have multiple related selects.

A switch from a throttle increment problem to a connection pool problem is
pretty much a guarantee that somewhere in your code a transaction is not
being ended.  Do a simple string search (or a "Find Usages/References" in a
good IDE) for startTransaction and endTransaction, and make sure the counts
are identical.  Then go through each and make sure that they're always
within the try/finally block as below.


2009/6/29 María Mora Ramiro <maria.moraramiro@gmail.com>

>   A couple of months ago, we experimented the same problem.
> We upgraded to ibatis 2.3.4 / ibatis dao 2.2.0 as you recommended and the
> throttle error disappeared. However, we are getting now an error with the
> connection pool (we use the jboss datasource via ibatis): “there are no more
> connections available”, it means our application is taking all the
> connections and remains waiting for the answer.
> We have deployed the same code in two different machines, and this error
> happens only in one of them (the one which receives less requests...). Our
> support team has told us, requests to database remains waiting. We have
> checked we are finishing transactions
> try {
>   start transaction
>   do work
>   commit transaction
> } finally {
>   end transaction
> }
> Do we have to do the same with "select" requests to database.
> Thanks.
> María

View raw message