1 Reply Latest reply on May 19, 2005 9:59 AM by Ulf Schroeter

    Does jboss reconnect to the database automatically.

    GnanaShekar Subramani Newbie

      Hi,

      After a network problem or database restart, does jboss reconnect to the database automatically.

      If not, is there a way to configure it so that it will automatically reconnect.

      Thanks & Regards,
      -GnanaShekar-

        • 1. Re: Does jboss reconnect to the database automatically.
          Ulf Schroeter Novice

          You can use the <check-valid-connection-sql> and <exception-sorter-class-name> element within "yourdatasource-ds.xml". Have a look into the jboss documentation on "Configuring JDBC Datasources" for more details.

          Here is a sample configuration for INFORMIX


          
           <local-tx-datasource>
           <jndi-name>SystemJaasDS</jndi-name>
           <connection-url>jdbc:informix-sqli:.....</connection-url>
           <driver-class>com.informix.jdbc.IfxDriver</driver-class>
           <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
           <prepared-statement-cache-size>10</prepared-statement-cache-size>
           <new-connection-sql>set lock mode to wait</new-connection-sql>
           <check-valid-connection-sql>set lock mode to wait</check-valid-connection-sql>
           <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.InformixExceptionSorter</exception-sorter-class-name>
           <!--pooling parameters-->
           <min-pool-size>1</min-pool-size>
           <max-pool-size>10</max-pool-size>
           <blocking-timeout-millis>5000</blocking-timeout-millis>
           <idle-timeout-minutes>300</idle-timeout-minutes>
           </local-tx-datasource>
          


          Regards
          Ulf