Hi Chris ,
We are using Tomcat 5.5 and Java 1.5 ,the below is the configuration of
server.xml , I am getting the exception when server is ideal from some amout
of time (app 2- 3 ) hours.
<?xml version="1.0" encoding="UTF-8"?>
<Server>
<Listener
className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>
<Listener
className="org.apache.catalina.storeconfig.StoreConfigLifecycleListener"/>
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"/>
<GlobalNamingResources>
<Environment
name="simpleValue"
type="java.lang.Integer"
value="30"/>
<Resource
auth="Container"
description="User database that can be updated and saved"
name="UserDatabase"
type="org.apache.catalina.UserDatabase"
pathname="conf/tomcat-users.xml"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"/>
</GlobalNamingResources>
<Service
name="Catalina">
<Connector
address="ip-address"
port="80"
redirectPort="8443"
minSpareThreads="25"
connectionTimeout="20000"
maxSpareThreads="75"
maxThreads="150">
</Connector>
<Connector
address="ip-address"
port="80"
redirectPort="8443"
minSpareThreads="25"
connectionTimeout="20000"
maxSpareThreads="75"
maxThreads="150">
</Connector>
<Connector
address="ip-address"
port="80"
redirectPort="8443"
minSpareThreads="25"
connectionTimeout="20000"
maxSpareThreads="75"
maxThreads="150">
</Connector>
<Connector
port="8009"
redirectPort="8443"
protocol="AJP/1.3">
</Connector>
<Engine
defaultHost="localhost"
name="Catalina">
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"/>
<Host
appBase="webapps"
name="localhost">
</Host>
<Host
appBase="webapps/intradesample"
name="intrade.eskilstuna.se">
<Context path="" debug="5" reloadable="false" crossContext="false">
<Resource name="jdbc/oracle" auth="Container"
type="javax.sql.DataSource"
driverClassName="oracle.jdbc.OracleDriver"
factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"
url="jdbc:oracle:thin:@ip-address:1521:sid"
username="xxx" password="xxx" maxActive="100"
maxIdle="20" maxWait="-1" minIdle="0"
validationQuery ="select 1 from dual"
testOnBorrow ="true"
testOnReturn ="true"
testWhileIdle ="true"
removeAbandoned="true"
timeBetweenEvictionRunsMillis ="600000"
numTestsPerEvictionRun ="3"
minEvictableIdleTimeMillis ="650000"
moveAbandonedTimeout="180" logAbandoned="true" />
</Context>
</Host>
<Host
appBase="webapps/intradetest"
name="intradetest.eskilstuna.se">
<Context path="" debug="5" reloadable="false" crossContext="false">
<Resource name="jdbc/oracle" auth="Container"
type="javax.sql.DataSource"
driverClassName="oracle.jdbc.OracleDriver"
factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"
url="jdbc:oracle:thin:@ip-address:1521:sid"
username="xxx" password="xxx" maxActive="100"
maxIdle="20" maxWait="-1" minIdle="0"
validationQuery ="select 1 from dual"
testOnBorrow ="true"
testOnReturn ="true"
testWhileIdle ="true"
timeBetweenEvictionRunsMillis ="600000"
numTestsPerEvictionRun ="3"
minEvictableIdleTimeMillis ="650000"
removeAbandoned="true"
moveAbandonedTimeout="180" logAbandoned="true" />
</Context>
</Host>
<Host
appBase="webapps/intradeutv"
name="intradeutv.eskilstuna.se">
<Context path="" debug="5" reloadable="false" crossContext="false">
<Resource name="jdbc/oracle" auth="Container"
type="javax.sql.DataSource"
driverClassName="oracle.jdbc.OracleDriver"
factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"
url="jdbc:oracle:thin:@ip-address:1521:sid"
username="xxx" password="xxx" maxActive="100"
maxIdle="20" maxWait="-1" minIdle="0"
validationQuery ="select 1 from dual"
testOnBorrow ="true"
testOnReturn ="true"
testWhileIdle ="true"
timeBetweenEvictionRunsMillis ="600000"
numTestsPerEvictionRun ="3"
minEvictableIdleTimeMillis ="650000"
removeAbandoned="true"
moveAbandonedTimeout="180" logAbandoned="true" />
</Context>
</Host>
<Host
appBase="webapps/jpivot"
name="intraderapport.eskilstuna.se">
</Host>
</Engine>
</Service>
</Server>
Best Regards Chandra
On Wed, Aug 26, 2009 at 4:09 PM, Christopher Schultz <
[email protected]> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Chandra,
>
> On 8/25/2009 11:56 PM, chandra ganta wrote:
> > We use a db datasource for one of our applications.
> > The issue is that there is a firewall between tomcat server 5.5 & db
> server
> > (ORACLE 9i), that cuts pool connections after 1 hour of ideal time.
> >
> > We've tried several configuration using :
> > validationQuery
>
> This should be all that is required. Can you post your whole configuration?
>
> Are you getting an exception at some point? If so, please post it.
>
> What exact version of Tomcat and JVM are you using?
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkqVQgAACgkQ9CaO5/Lv0PDZrACgk3+onsHt4KuddWe9zPFc944/
> pcoAoKpXnRlGH2dzIC8zKS4T18xcz3vZ
> =WlvI
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>