<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
JBoss Connection pool not recovered after a database outage with back ground validation enabled
</h3>
<span style="margin-bottom: 10px;">
created by <a href="https://community.jboss.org/people/kodali.rameshbabu">Ramesh Kodali</a> in <i>Datasource Configuration</i> - <a href="https://community.jboss.org/message/830034#830034">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>Hi,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>To give a littler backround of the problem,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Recently we had a data base outage in production due to some  locks applied on tables(due to abnormal termination of DB update jobs)  and it causes  all the connections in JDBC connection pool waiting at data base and waiting to get hold of tables.  After some time, it leads all the connections in the connection pool got exhausted and no more conenctions in the pool.  Aplication server started throrwing connection errors for new coming request as no more conenctions available in pool.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>DBA killed those waiting threads and restarted data base instance.  Though after DB servers restarts,  still App servers can not recover the connections in connection pool and it forces us to restart App servers too.</p><p>After App servers restarts, problem solved.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><strong>Now question is:</strong>  Why JBoss App servers required to restart after DB  servers are back up?  Will JBoss connection pool does not have mechanism to recover connections automatically?</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="color: #3366ff;">P.S:  Other team in our company not enabled the back ground validation in their ds.xml, their App servers does not require restart after DB back up.  Their App servers picked up connections automatically.</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="color: #000000;">What makes the back ground validation different here?</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Your valueble inputs are much apprecitated. Also if it a problem,  can you please suggest the solution to fix this.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>We are using JBoss AS 5.0</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="text-decoration: underline;">Here below our JBoss ds.xml configuration:</span></p><p>We are using the Informix data base.</p><p><span style="text-decoration: underline;"><br/></span></p><p><local-tx-datasource></p><p>        <jndi-name>JNDIName</jndi-name></p><p>        <connection-url>Connection_URL</connection-url></p><p>        <driver-class>com.informix.jdbc.IfxDriver</driver-class></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>        <!-- Use the security domain defined in conf/login-config.xml --></p><p>        <security-domain>Sample-POLICY</security-domain></p><p>        <depends>jboss.security:service=JaasSecurityDomain,domain=ServerMasterPassword</depends></p><p>        <new-connection-sql>SET LOCK MODE TO WAIT </new-connection-sql></p><p>        <check-valid-connection-sql>select * from sysmaster:sysdual</check-valid-connection-sql></p><p>        <min-pool-size>5</min-pool-size></p><p>        <max-pool-size>200</max-pool-size></p><p>     <span style="color: #ff0000;">   <idle-timeout-minutes>3</idle-timeout-minutes></span></p><p><span style="color: #ff0000;">        <background-validation-millis>20000</background-validation-millis></span></p><p><span style="color: #ff0000;">        <validate-on-match>false</validate-on-match></span></p><p><span style="color: #ff0000;">        <query-timeout>15</query-timeout></span></p><p><span style="color: #ff0000;">        <set-tx-query-timeout>true</set-tx-query-timeout></span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>        <prepared-statement-cache-size>20</prepared-statement-cache-size></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>        <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.InformixExceptionSorter</p><p>        </exception-sorter-class-name></p><p>        <metadata></p><p>            <type-mapping>InformixDB</type-mapping></p><p>        </metadata></p><p></local-tx-datasource></p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/830034#830034">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in Datasource Configuration at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2077">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>