commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tworkiewicz, Adam" <Adam.Tworkiew...@sabre-holdings.com>
Subject Dbcp // Validation query timeout
Date Fri, 11 May 2007 18:09:24 GMT
Hi,

We use dbcp for connection pooling in our application that talks to
Oracle 10g RAC (2 nodes). Our dbcp config is attached below. We are
seeing undesired behaviour when we test db failover. Since we use load
balancing connections in the pool point to both db servers. When we
shutdown one of the db nodes our ping query hangs waiting for TCP/IP
traffic. Since the box is down there is no traffic and the query hangs
until a TCP/IP timeout occures.

Is there a way to set up a timeout on the validation query?

Thanks,
Adam


<bean id="myDataSource"
                class="org.apache.commons.dbcp.BasicDataSource"
                destroy-method="close">
                <property name="driverClassName"
                        value="oracle.jdbc.driver.OracleDriver" />
               <property name="url"
                                 value="jdbc:oracle:thin:@(DESCRIPTION
=(ADDRESS = (PROTOCOL = TCP)(HOST 10.19.60.28)(PORT= 1521))(ADDRESS =
(PROTOCOL = TCP)(HOST = 10.19.60.30)(PORT =
1521))(FAILOVER=ON)(LOAD_BALANCE = yes)(CONNECT_DATA =(SERVER =
DEDICATED)(SERVICE_NAME = sgsasd))))" />
                <property name="username" value="****" />
                <property name="password" value="****" />
                <property name="validationQuery" value="select 1 from
dual" />
                <property name="testOnBorrow" value="true" />
                <property name="initialSize" value="15" />
                <property name="maxActive" value="15" />
                <property name="maxIdle" value="15" />
        </bean>


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message