If you use Oracle, some DBCP settings may not work and you may need to
use Oracle connection pool classes.
In particular, I was not able to use DBCP and have a loginTimeout when
using Oracle.

Using Oracle connection pool classes, the validation query does not
work in the same way as in Apache DBCP. Apache DBCP tries to give you
a valid connection if the query fails. Oracle will just test and throw
an exception indicating the connection is stale (as opposed to just
giving you the stale connection). So even with an Oracle RAC, the pool
may return a stale connection or throw an exception. So, I use Oracle
Connection Caching settings to grow a pool from 0 to n and discard any
connection that has been idle more than T seconds. This was worked
well in production environment. (without having to switch to Oracle
UCP, which was our next option).


On Fri, Feb 25, 2011 at 3:17 PM, Christopher Schultz
<ch...@christopherschultz.net> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> David,
>
> On 2/24/2011 12:08 PM, David Smith wrote:
>> With tomcat's built-in database pooling, just adding a validation query
>> to the resource config should be all that's necessary.  On each borrow
>> of a connection, the connection is tested and closed if the test fails.
>> Failed connections are replaced with new ones.
>
> +1
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk1oDkQACgkQ9CaO5/Lv0PB4ywCffleVFm8jZtJRcD3x2V3gCs6T
> DBUAoKUD6zJXXPURMoQLtm8SGecxQfqk
> =MkzS
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> 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