DBCP Connection Validity Check



I use Apache's DBCP for my Connection Pool implementation. (Default
connection: 5 connections, with 1000 secs for idletimeout). I usually
connect to Oracle 10g DB.

While creating the Pool, I pass on the validityCheck(Select count(*)
from table_name where table_name has no data) query to the DBCP
interface PoolableConnectionFactory.

So my connection pool works with DBCP and I can do operations from the
app.

To test the Validity Check:
I bounce the DB and bring it up immediately.

So when I try to perform certain acitivites on my UI, I get
exceptions(Connection Exceptions) for the first 2 attempts and from the
3rd attempt everything works fine. Then onwards my app is able to get
data from DB as usual.

I also see that testonBorrow is set to TRUE by default.


Any information as why I see the above situation would be helpfull.

Thanks.

.



Relevant Pages

  • Re: after network drop i get ora-03114 not connected to oracle
    ... I guess this is a connection pool feature. ... Why don't you use Oracle managed provider in first place? ... this works fine and when network drops/fails i get a timeout. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: after network drop i get ora-03114 not connected to oracle
    ... Try clearing connection pool and re-create connection when this happens. ... Why don't you use Oracle managed provider in first place? ... this works fine and when network drops/fails i get a timeout. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Connection Pooling - tracking users
    ... end-user for connections made through a connection pool where all the ... sessions use the same Oracle username and show as the OS user of the ... Oracle by the application. ...
    (comp.databases.oracle.misc)
  • ODP .Net Connection Pool Problem on Web Application
    ... I am a .Net developer of a Large Online Retailling Company. ... like to have your help on a Connection Pool issue. ... Oracle Database 10g. ... it may hit a long query in the database. ...
    (microsoft.public.dotnet.framework.aspnet)
  • ODP .Net Connection Pool Problem on Web Application
    ... I am a .Net developer of a Large Online Retailling Company. ... like to have your help on a Connection Pool issue. ... Oracle Database 10g. ... it may hit a long query in the database. ...
    (microsoft.public.dotnet.framework.adonet)