tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jose María Zaragoza <demablo...@gmail.com>
Subject Re: Tomcat7 - ajax and connection pool : "connection closed" despite the use of "validationQuery" and "testOnBorrow"
Date Fri, 05 Apr 2013 22:06:54 GMT
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.propes@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: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 <barry.l.propes@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-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 :
> >
> > <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-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
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message