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.
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

Reply via email to