OK, thank you, Jose!

Good to know if I ever go the MySQL route. 

-----Original Message-----
From: Jose María Zaragoza [mailto:demablo...@gmail.com] 
Sent: Friday, April 05, 2013 5:07 PM
To: Tomcat Users List
Subject: Re: Tomcat7 - ajax and connection pool : "connection closed" despite 
the use of "validationQuery" and "testOnBorrow"

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 <barry.l.pro...@citi.com>

> Ok, thanks for clarification. I thought it had to be "from some faux 
> table or object."
>
>
> -----Original Message-----
> From: Jose María Zaragoza [mailto:demablo...@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 <barry.l.pro...@citi.com>
>
> >  I could be wrong, but is that validationQuery attribute correct?
> >
> > "SELECT 1"  ? - I have validationQuery="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-c...@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 :
> >
> > <Resource
> >          name="jdbc/607"
> >          auth="Container"
> >          type="javax.sql.DataSource"
> >          username="xxxxx"
> >          password="xxxxx"
> >          driverClassName="com.mysql.jdbc.Driver"
> >          url="jdbc:mysql://localhost:3306/XXXXX"
> >          removeAbandoned="true"
> >          removeAbandonedTimeout="300"
> >          testOnBorrow="true"
> >          validationQuery="SELECT 1"
> >          logAbandoned="true"
> > />
> > Tomcat 7.0.29
> > Linux Fedora Core 12
> >
> >
> >
> > --------------------------------------------------------------------
> > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > For additional commands, e-mail: users-h...@tomcat.apache.org
> >
> >
> > --------------------------------------------------------------------
> > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > For additional commands, e-mail: users-h...@tomcat.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to