commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aitor Imaz" <>
Subject RE: [Commons DBCP] Question.
Date Wed, 10 Sep 2003 11:24:16 GMT
This is the validation query I use on SAPDB:

      <value>SELECT * FROM DUAL</value>

AFAIK you can use any validation query as long as it returns at least
one row as a result.

As for the SAPDB connections timing out, try setting the SESSION_TIMEOUT
parameter to 0 (= no timeout) on the Database Manager. This is the value
recommended when pooling connections.

I hope this helps,

-----Mensaje original-----
De: Kwok Peng Tuck [] 
Enviado el: miƩrcoles, 10 de septiembre de 2003 12:30
Para: Jakarta Commons Users List
Asunto: Re: [Commons DBCP] Question.

That didn't work, if  a connection in the pool was closed. I still get 
an exception.
Are you referring to the DBCP that shipped with tomcat or did you 
replace the jar ?

TULK, Daniel, FM wrote:

>I had a similar problem and it was because the connections weren't
>validated. The current release version of DBCP allows a validationQuery
>configuration parameter. The parameter is used to test the database
>connection before it is returned, when it isn't valid it will be
renewed. I
>don't know how to test a SAPDB connection but for Sybase I added this
to my
>Tomcat server.xml in the section where the DataSource is configured:
>	<name>validationQuery</name>
>      <value>SELECT 1</value>
>-----Original Message-----
>From: Kwok Peng Tuck []
>Sent: 10 September 2003 11:09
>To: Jakarta Commons Users List
>Subject: [Commons DBCP] Question.
>I have a question about commons DBCP, maybe someone has and idea.
>I want to know how commons DBCP would cope with DB connections that
>gone idle and are closed by the
>I've used commons DBCP provided by tomcat and find that after 15
>SAPDB will close the connection.
>When DBCP gives the webapp a connection, we get a BorrowObject null and

>throw a exception. I've found that
>writing some sort of keep alive helps this alot for us.
>Does anyone know if the nightly build of DBCP can cope with this better

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message