Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 39400F818 for ; Fri, 5 Apr 2013 22:07:45 +0000 (UTC) Received: (qmail 44115 invoked by uid 500); 5 Apr 2013 22:07:41 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 44058 invoked by uid 500); 5 Apr 2013 22:07:41 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 43993 invoked by uid 99); 5 Apr 2013 22:07:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Apr 2013 22:07:39 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of demablogia@gmail.com designates 209.85.214.181 as permitted sender) Received: from [209.85.214.181] (HELO mail-ob0-f181.google.com) (209.85.214.181) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Apr 2013 22:07:34 +0000 Received: by mail-ob0-f181.google.com with SMTP id ni5so4071537obc.40 for ; Fri, 05 Apr 2013 15:07:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=3P1icD3Hihh/4R22RVDr1DfMtIOxYVVUIRVNK+UbWbY=; b=CAEdhvg0IGqv7jMu4zTojL6hF2DV2kPlBmh5MAHl3XDYgZGW2QnDXw9Y2ed7sEWjNG MB+qCE7wqA4EbaFoSXnsa4upXym07XTXoNrMi7MBDwfX4n+9osNe4588oUWVyk8mOm7v PyMa3Hywoh88z5s6GW7QCs2qCPD2KqSYxMvHJyJKNizB9nXeHRnH/eFFRn9h29CKi6MS QCFHwZwklbuAdI5XCZYIH4bs9lreo2dsbwax4fVC17iMRH4U89JmdOVAKNdX+Nxm0/zA 0AL4KDatf4G5Np844zT+E+F/qlAp1Ku1VfFMbhM9X/7pH6/2Uzjs9pa6ixHoeO9NgTcj /NMA== X-Received: by 10.60.6.133 with SMTP id b5mr9221652oea.81.1365199634118; Fri, 05 Apr 2013 15:07:14 -0700 (PDT) MIME-Version: 1.0 Received: by 10.76.122.173 with HTTP; Fri, 5 Apr 2013 15:06:54 -0700 (PDT) In-Reply-To: References: <515E9B5A.3060909@medifirst.fr> <515EEFC8.7090108@medifirst.fr> From: =?ISO-8859-1?Q?Jose_Mar=EDa_Zaragoza?= Date: Sat, 6 Apr 2013 00:06:54 +0200 Message-ID: Subject: Re: Tomcat7 - ajax and connection pool : "connection closed" despite the use of "validationQuery" and "testOnBorrow" To: Tomcat Users List Content-Type: multipart/alternative; boundary=e89a8fb203343d925304d9a44f1f X-Virus-Checked: Checked by ClamAV on apache.org --e89a8fb203343d925304d9a44f1f Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable And that's right . You can define any SQL , but you prefer the easiest ( and fastest ) Indeed , you could use SELECT 1 FROM DUAL in MySQL, but it's not required by using FROM DUAL >From MySQL doc "DUAL is purely for the convenience of people who require that all SELECT statements should have FROM and possibly other clauses. MySQL may ignore the clauses. MySQL does not require FROM DUAL if no tables are referenced." I think that Oracle requires "FROM" word in queries ( I think ) 2013/4/5 Propes, Barry L > Ok, thanks for clarification. I thought it had to be "from some faux tabl= e > or object." > > > -----Original Message----- > From: Jose Mar=EDa Zaragoza [mailto:demablogia@gmail.com] > Sent: Friday, April 05, 2013 3:44 PM > To: Tomcat Users List > Subject: Re: Tomcat7 - ajax and connection pool : "connection closed" > despite the use of "validationQuery" and "testOnBorrow" > > 'select 1 from dual' works in Oracle DB > > In MySQL, "select 1" > > > 2013/4/5 Propes, Barry L > > > I could be wrong, but is that validationQuery attribute correct? > > > > "SELECT 1" ? - I have validationQuery=3D"select 1 from dual" in mine, > > and my doc states it has to be a valid SQL statement returning at least > one row. > > > > That may not factor in at all, just noticed it. Looked maybe out of > kilter. > > > > -----Original Message----- > > From: Jean-Claude Haw-King-Chon [mailto:JChaw-king-chon@medifirst.fr] > > Sent: Friday, April 05, 2013 10:38 AM > > To: Tomcat Users List > > Subject: Re: Tomcat7 - ajax and connection pool : "connection closed" > > despite the use of "validationQuery" and "testOnBorrow" > > > > .. > > > > My configuration : > > > > > name=3D"jdbc/607" > > auth=3D"Container" > > type=3D"javax.sql.DataSource" > > username=3D"xxxxx" > > password=3D"xxxxx" > > driverClassName=3D"com.mysql.jdbc.Driver" > > url=3D"jdbc:mysql://localhost:3306/XXXXX" > > removeAbandoned=3D"true" > > removeAbandonedTimeout=3D"300" > > testOnBorrow=3D"true" > > validationQuery=3D"SELECT 1" > > logAbandoned=3D"true" > > /> > > Tomcat 7.0.29 > > Linux Fedora Core 12 > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > > For additional commands, e-mail: users-help@tomcat.apache.org > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > > For additional commands, e-mail: users-help@tomcat.apache.org > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > > --e89a8fb203343d925304d9a44f1f--