I'm not an expert, but I suspect that the resource config parameters will act like javabean setters. So you should be able to specify something like: <parameter> <name>validationQuery</name> <value>SELECT 1</value> </parameter> <parameter> <name>testOnBorrow</name> <value>true</value> </parameter>
> -----Original Message----- > From: Emerson Cargnin [mailto:[EMAIL PROTECTED] > Sent: Thursday, July 15, 2004 4:30 PM > To: Tomcat Users List > Subject: Re: DBCP pool > > > How do I specify the test query as context param? There is nothing in > the JDBC configuration of DBCP in tomcat 5 docs. > BTW, I found some typos erros, must I create a bug, or may I > put it here? > > other question: > > May I mix the Resource and ResourceParams tags?? I'm asking > this because > I have to configure 2 connection in some apps, so I must put > a Resource > and a ResourceParams tag sequencially for each connection I want to > configure?? > > Thanks for your response > > Emerson > > Mike Curwen wrote: > > I think the way to do this with DBCP is to specify a test > query. The > > pool would then run this query (like "SELECT 1") before > giving out the > > connection. If it failed (and if it's because the connection is > > closed), it will null this connection in the pool, open a new > > connection, and retest it, and then give this one out. > > > > If any of that is factually wrong, someone will be sure to > jump in and > > correct me. > > > > > > > > > >>-----Original Message----- > >>From: Emerson Cargnin [mailto:[EMAIL PROTECTED] > >>Sent: Thursday, July 15, 2004 3:03 PM > >>To: Tomcat Users List > >>Subject: Re: DBCP pool > >> > >> > >>none of them, I mean the timeout set in database, the maximum > >>life time > >>for an connection. This is used when you have a database that has a > >>given timeout, let's say, 10 minutes, so you can't have this > >>connection > >>opened for more than 10 minutes, what would case an error due to an > >>timeouted connection. > >> > >> > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > -- > Emerson Cargnin > Analista de Sistemas - Gerente Regional - Tubar�o > Setor de Desenvolvimento de Sistemas - TRE-SC > tel : (048) - 251-3700 - Ramal 3181 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
