Return-Path: Delivered-To: apmail-commons-user-archive@www.apache.org Received: (qmail 87268 invoked from network); 22 May 2008 12:43:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 May 2008 12:43:42 -0000 Received: (qmail 35996 invoked by uid 500); 22 May 2008 12:43:39 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 35816 invoked by uid 500); 22 May 2008 12:43:38 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 35805 invoked by uid 99); 22 May 2008 12:43:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 May 2008 05:43:38 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [85.158.181.16] (HELO server172-han.de-nserver.de) (85.158.181.16) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 May 2008 12:42:50 +0000 Received: (qmail 10064 invoked from network); 22 May 2008 14:42:58 +0200 Received: from chello084114024196.14.vie.surfer.at (HELO darkstar-10.local) (84.114.24.196) (smtp-auth username siegfried.goeschl@it20one.com, mechanism plain) by server172-han.de-nserver.de (qpsmtpd/0.40) with ESMTPA; Thu, 22 May 2008 14:42:58 +0200 Message-ID: <48356A56.8020508@it20one.at> Date: Thu, 22 May 2008 14:43:02 +0200 From: Siegfried Goeschl Reply-To: siegfried.goeschl@it20one.at Organization: IT20one GmbH User-Agent: Thunderbird 2.0.0.14 (Macintosh/20080421) MIME-Version: 1.0 To: Commons Users List Subject: Re: recreation of connections in the dbcp References: <1841a3c10805220143w659fcd7dgc20223593babdbac@mail.gmail.com> <483561D8.1020906@yale.edu> In-Reply-To: <483561D8.1020906@yale.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-User-Auth: Auth by siegfried.goeschl@it20one.com through 84.114.24.196 X-Virus-Checked: Checked by ClamAV on apache.org And this also works for mySQL Siegfried Goeschl Mark Shifman wrote: > for Oracle use > > validationQuery="SELECT 1 from dual" > > James Carman wrote: > >> I'd use a validation query. I believe that will solve your problem. >> That way, the pool implementation can check to see that the connection >> is "valid" before handing it off to you. For HSQLDB, I use: >> >> select 1 from INFORMATION_SCHEMA.SYSTEM_USERS >> >> You can come up with something similar for other database products. >> Hope that helps! >> >> On Thu, May 22, 2008 at 4:43 AM, wrote: >> >>> Hello, >>> >>> I use database connection pool BasicDataSource for manegment of DB >>> connections. When DB Server is restarted all connections are loosed. >>> How can I handle this situation? Should I create new BasicDataSource >>> or invoke some method. >>> >>> Thank you. >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org >>> For additional commands, e-mail: user-help@commons.apache.org >>> >>> >>> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org >> For additional commands, e-mail: user-help@commons.apache.org >> >> > > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org