1 Reply Latest reply on Sep 13, 2012 7:47 AM by Frank Langelage

    how to auto reconnect oracle

    tianheng shi Newbie

      jboss4 :

      <exception-sorter-class-name>

      org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter

      </exception-sorter-class-name>

       

      now not work ,it said  unabke to load org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter

       

      how to config the datasource auto reconnect in jboss7?

        • 1. Re: how to auto reconnect oracle
          Frank Langelage Master

          My datasource definitions look like this

          {code:xml}

          <?xml version="1.0" encoding="UTF-8"?>

          <datasources xmlns="http://www.jboss.org/ironjacamar/schema">

            <xa-datasource jndi-name="..." enabled="true" use-java-context="true" pool-name="...">

              <xa-datasource-property name="URL">jdbc:oracle:thin:@host:port:sid</xa-datasource-property>

              <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>

              <driver>ojdbc6.jar</driver>

              <security>

                <user-name>...</user-name>

                <password>...</password>

              </security>

              <validation>

                <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleValidConnectionChecker"/>

                <stale-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleStaleConnectionChecker"/>

                <exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleExceptionSorter"/>

              </validation>

              <statement>

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

              </statement>

            </xa-datasource>

          </datasources>

          {code}