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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to