-----Original Message-----
From: Dames, Kristopher J [mailto:kristopher.da...@mercy.net] 
Sent: Friday, December 13, 2013 1:39 PM
To: Tomcat Users List
Subject: RE: What if my database is unavailable at startup?

Daniel,

I use tomcat 6.0.32. Here is an example Resource tag:

<Resource 
    accessToUnderlyingConnectionAllowed="false"
    auth="Container"
    defaultAutoCommit="true"
    defaultReadOnly="false" 
    defaultSchema="xxxxx"
    driverClassName="oracle.jdbc.driver.OracleDriver"
    factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"
    initialSize="0" 
    logAbandoned="false" 
    maxActive="20"
    maxIdle="8" 
    maxOpenPreparedStatements="0" 
    maxWait="5000"
    minEvictableIdleTimeMillis="1800000" 
    minIdle="5"
    name="jdbc/xxxxx" 
    numTestsPerEvictionRun="3"
    password="xxxxx" 
    poolPreparedStatements="false"
    removeAbandoned="true" 
    removeAbandonedTimeout="300"
    testOnBorrow="true" 
    testOnReturn="false"
    testWhileIdle="true" 
    timeBetweenEvictionRunsMillis="1800000"
    type="javax.sql.DataSource"
    url="jdbc:oracle:thin:@xxxxx.yyyyy.com:1521:xxxxx"
    username="xxxxx"
    validationQuery="SELECT 1 FROM DUAL"
/>


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"/>
    




This email contains information which may be PROPRIETARY IN NATURE OR OTHERWISE 
PROTECTED BY LAW FROM DISCLOSURE and is intended only for the use of the 
addresses(s) named above.  If you have received this email in error, please 
contact the sender immediately.

---------------------------------------------------------------------
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