You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Julien Thewys <jt...@udev.org> on 2007/10/16 18:23:50 UTC
PingQuery with BasicDataSource
Hi,
I used to defined my pool parameters in the sqlMapConfig file, thus in XML.
I now have to explicitly declare a datasource: for this I use DBCP with a
BasicDataSource.
How can I set the PingQuery parameters on a BasicDataSource, like I did in the
sqlMapConfig file (<property name="Pool.PingQuery" value ... >)?
Thanks,
--
jt
Re: PingQuery with BasicDataSource
Posted by Julien Thewys <jt...@udev.org>.
Brandon Goodin <brandon.goodin <at> gmail.com> writes:
>
http://commons.apache.org/dbcp/apidocs/org/apache/commons/dbcp/BasicDataSource.html#validationQuery
Oh yes it's nearly equivalent, don't know how that could skip my mind. Thanks.
Then, could a mix of testOnBorrow, testWhileIdle and
timeBetweenEvictionRunsMillis be nearly equivalent to PingEnable,
PingConnectionsOlderThan and PingConnectionsNotUsedFor?
--
jt
Re: PingQuery with BasicDataSource
Posted by Brandon Goodin <br...@gmail.com>.
http://commons.apache.org/dbcp/apidocs/org/apache/commons/dbcp/BasicDataSource.html#validationQuery
Brandon
On 10/16/07, Julien Thewys <jt...@udev.org> wrote:
>
> Hi,
>
> I used to defined my pool parameters in the sqlMapConfig file, thus in
> XML.
> I now have to explicitly declare a datasource: for this I use DBCP with a
> BasicDataSource.
>
> How can I set the PingQuery parameters on a BasicDataSource, like I did in
> the
> sqlMapConfig file (<property name="Pool.PingQuery" value ... >)?
>
> Thanks,
> --
> jt
>
>