-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Chandra,

On 8/27/2009 7:50 AM, chandra ganta wrote:
>       <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" />

You shouldn't have to specify the 'factory'. Is there a reason you do?

You also shouldn't need testOnReturn and testWhileIdle, though I
understand you're probably desperate.

When I start my Tomcat, I get a message like this in catalina.out:

AbandonedObjectPool is used
(org.apache.tomcat.dbcp.dbcp.abandonedobjectp...@153b098)
   LogAbandoned: true
   RemoveAbandoned: true
   RemoveAbandonedTimeout: 30

Do you get a similar message? If so, please post it. Unfortunately, it
doesn't look like it dumps its "test" configuration.

I can't imagine that it matters, but you might want to take out the
spaces after the = signs in your XML (like validationQuery ="true").

You could also try writing some code like this:

org.apache.tomcat.dbcp.dbcp.DataSource ds = ctx.lookup("jcbd/oracle");
System.out.println("validationQuery=" + ds.getValidationQuery());
System.out.println("testOnBorrow=" + ds.getTestOnBorrow());
System.out.println("testOnReturn=" + ds.getTestOnReturn());
System.out.println("testWhileIdle=" + ds.getTestWhileIdle());

...and see what it emits. I suspect something is wrong with your
validation query being set on the data source.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkqb6nwACgkQ9CaO5/Lv0PBtcwCeOuYgDBrEiY8MNZjTjeqbBkmt
/6AAnRYvN27bEf/tiAZFs9HyJ0KhZFx5
=doLY
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to