commons-user mailing list archives

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

<parameter>
	<name>validationQuery</name>
      <value>SELECT * FROM DUAL</value>
</parameter>

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,
Aitor


-----Mensaje original-----
De: Kwok Peng Tuck [mailto:pengtuck@makmal.net] 
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
being
>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:
>
><parameter>
>	<name>validationQuery</name>
>      <value>SELECT 1</value>
></parameter>
>
>Dan
>
>-----Original Message-----
>From: Kwok Peng Tuck [mailto:pengtuck@makmal.net]
>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
have 
>gone idle and are closed by the
>database.
>I've used commons DBCP provided by tomcat and find that after 15
minutes 
>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
?
>
>Thanks.



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message