Hi,
The validation query parameter is for DBCP, which would be in server.xml or in your 
context's context.xml file if you're using the DBCP connection pooling as outlined in 
the JNDI DataSources How-To document.

As an aside: the database server going down is a serious event.  You need to carefully 
code your application for that case if it's likely to happen frequently.  The 
validation query will prevent the pool from handing out bad connections, but it won't:
- Magically make valid those connections used by your app at the moment the server 
goes down,
- Necessarily prevent the pool from "hanging" or waiting for the server to come back 
up, potentially indefinitely (or throw a SQLException after a timeout, depending on 
your configuration).

So I'm just saying it's not the complete solution ;)

Yoav Shapira
Millennium ChemInformatics

-----Original Message-----
From: Adrian Kristiawan [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 10, 2004 7:58 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: Why do I need to restart my server

Hi,
�
I'm having the same problem, I want to ask which file should I edit according to the 
changes below?
�
Thanks All. ��
�
-------Original Message-------
�
From: Tomcat Users List
Date: 03/10/04 19:41:47
To: Tomcat Users List
Subject: Re: Why do I need to restart my server
�
This works with most except for oracle which uses select 1 from dual
�
����<parameter>
������<name>validationQuery</name>
������<value>select 1</value>
����</parameter>
�
�
On Wed, 10 Mar 2004 [EMAIL PROTECTED] wrote:
�
> Date: Wed, 10 Mar 2004 16:49:21 +0530
> From: [EMAIL PROTECTED]
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Why do I need to restart my server
>
>
>
>
>
> Hi,
> Every time my database server connection goes down, I need to restart my
> Tomcat 5.0.19 to re-establish the connection. Why is this so? Is this a
> bug?
�
�
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
�
�




____________________________________________________
� IncrediMail - Email has finally evolved - Click Here



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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

Reply via email to