2 Replies Latest reply on Nov 27, 2013 5:33 AM by Radim Hanus

    after db2 restart jboss must restart

    Ben Gao Novice

      In jboss 5,add <check-valid-connection-sql>select count(1) from SYSIBM.SYSDUMMY1</check-valid-connection-sql>  this if db2 restart ,jboss will no need restart!

       

      but In jboss as 7.2 ,I add

      <datasource jndi-name="java:/txCusti" pool-name="db2DS_custidb" enabled="true">

              <connection-url>jdbc:db2://172.17.252.42:60088/custidb:currentSchema=CU_STIDB;</connection-url>

              <driver>DB2</driver>

              <security>

                  <security-domain>EncryptedPassword_custidb</security-domain>

              </security>

      <validation> 

                       <check-valid-connection-sql>select count(1) from SYSIBM.SYSDUMMY1</check-valid-connection-sql>

              </validation> 

              <pool>

                  <min-pool-size>2</min-pool-size>

                  <max-pool-size>100</max-pool-size>

                  <use-strict-min>true</use-strict-min>

              </pool>

              <timeout>

                  <idle-timeout-minutes>10</idle-timeout-minutes>

                  <blocking-timeout-millis>30000</blocking-timeout-millis>

              </timeout>

       

       

              <statement>

                  <prepared-statement-cache-size>30</prepared-statement-cache-size>

              </statement>

          </datasource>

       

      but After the DB2 is restarted, JBOSS should renew the connection (reconnect) but it doesnt happen. Please advise!! i MUST restart th jboss