-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Barry,
On 12/23/13, 4:14 PM, Propes, Barry L wrote: > > -----Original Message----- From: Tomcat Random > [mailto:tomcat.ran...@gmail.com] Sent: Monday, December 23, 2013 > 2:56 PM To: Tomcat Users List Subject: Re: What if my database is > unavailable at startup? > > Barry, > > You have testOnBorrow="true" without a validation query. That means > the line is useless. Or as the docs say:* NOTE - for a true value > to have any effect, the validationQuery parameter must be set to a > non-null string* > > Best, Alec > > > On Mon, Dec 16, 2013 at 10:07 AM, Propes, Barry L > <barry.l.pro...@citi.com>wrote: > >> >> >> -----Original Message----- From: Howard W. Smith, Jr. >> [mailto:smithh032...@gmail.com] Sent: Friday, December 13, 2013 >> 4:23 PM To: Tomcat Users List Subject: Re: What if my database is >> unavailable at startup? >> >> OP, >> >> On Fri, Dec 13, 2013 at 2:24 PM, Dames, Kristopher J < >> kristopher.da...@mercy.net> wrote: >> >>> I use tomcat 6 and have noticed if a database is not available >>> when tomcat starts, tomcat will not try to connect once the >>> database becomes >> available. >>> Tomcat must be restarted to establish the database connection. >>> What are best practices regarding this? Is there a way in >>> tomcat to get it to automatically retry so I don't have to >>> restart tomcat? I use DBCP but am willing to try some other >>> pool. >> >> >> Barry, >> >> On Fri, Dec 13, 2013 at 4:59 PM, Propes, Barry L >> <barry.l.pro...@citi.com >>> wrote: >> >>> I use DBCP and Oracle as well, and am also on Tomcat 6 - >>> 6.0.26. Take a look at mine, as I have NO trouble with it, and >>> see if you can configure it similarly with success. NOTE - >>> remove those other two parameters that Jose mentions in a prior >>> email. >>> >>> <Resource auth="Container" description="mytomcatapp" >>> name="jdbc/myoracle" type="javax.sql.DataSource" >>> driverClassName="oracle.jdbc.driver.OracleDriver" >>> username="username" password="password" >>> url="jdbc:oracle:thin:@cgnrdb1p:1648:SERVNAME" maxIdle="30" >>> maxWait="10000" maxActive="10" testOnBorrow="true" >>> timeBetweenEvictionRunsMillis="-1" >>> minEvictableIdleTimeMillis="28800" >>> poolPreparedStatements="true" removeAbandoned="true" >>> removeAbandonedTimeout="300" logAbandoned="false"/> >>> >> >> are you suggesting that your (or a correct(ed)) <Resource> will >> solve the problem stated in OP (above)? >> >> can/should we assume that your URL is referencing a database on a >> different machine, same network/intranet/LAN? >> >>> url="jdbc:oracle:thin:@xxxxx.yyyyy.com:1521:xxxxx" >> >> it seems as though OP is referencing a database somewhere on the >> 'internet'. >> >> -------------------------------------------------------------- >> >> Oh ok. Yes, mine is on the same network, through an intranet. >> Different machine, but same network. If that helps. >> >> > > > OK, thanks for the heads up. I'll remove that attribute as I really > don't need it. ... and you'll get the default, which is .... (wait for it): testOnBorrow="true" Are you sure you'll never get a dropped Connection? - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJSuLBRAAoJEBzwKT+lPKRYuq4P/2TPBX4rXZ+UXe4b/0Ra6O7e jkhNZT6IFC3lsFRXAdpdgNc3Cj0cudLzlfqViOwwAVbWcUSL8SXTaU72Ty9r5rM9 rn2LOBLgn5zIPVTsW25+/AUv+8Ffxjse3tgeWBCAMglxAt6qBtWJoOUEWTw/3UXF m3e8TnKSkpMnLPPUYCWvXoJbp8oBNx6gvBtDLtwMewNZ86E2zzxmdmUPeQA9oJQ9 FHQr6WX8H7f5RjR0oEc9fOLiAHYkxmFDLzsNgXP7aH9VeymNCms9iMc54Ey8SnFP 9Rlthn6Gopg9zOCwgGBJRk3CEQajWVmEOalGCpr4KDt83NMC59OhDwZosBL/k/P9 2x0oEQHW3/zyDT+LOGX1Zphb8OnawUhZ6/ht9Y/QEcmefWsMEBU4tIjSjOLpnCfB KtMhcl4iceTfpOmuFsR7GvwPhJ3JjpfbnPa+WO+W9qFPXeiCyaJK14xPMZo4T8Tu 27V5t8wrbjl57DBrQUScCYsHvOiSodqlI5u1CudojUo6eq8FSPabVHW8utr+S6k9 6cUHcjweqrasXEOILKYuC5v0P+/aTdhJqYL8JK9Jd7Mcn5tzgzTj1r8CWAFPaP40 YB8Psa/Xv0KwQPHB8jcUNQlP4af9TkfVuG4pqzpJ/2YxSXi2/a6uIo0YaN0QqCDB 6XhbjMPhW+TqiBm/oKaW =AzYx -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org