0 Replies Latest reply on May 18, 2011 6:32 AM by gunnarbos

    How to set up OracleValidConnectionChecker

    gunnarbos

      Hi,

      We use JBoss 5.1.0.GA and java 1.6 and run in to trouble with org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker.

      The oracle-ds.xml contains

       

      <!-- sql to call when connection is created -->

                          <new-connection-sql>select 1 from dual</new-connection-sql>

                          <!-- sql to call on an existing pooled connection when it is obtained from

                                    pool - the OracleValidConnectionChecker is prefered -->

                          <check-valid-connection-sql>select 1 from dual</check-valid-connection-sql>

                          <!--valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker

                          </valid-connection-checker-class-name-->

       

      If I remove the comment around OracleValidConnectionChecker I get this warning:

       

      08:23:24,519 WARN  [org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker] (http-0.0.0.0-8080-1) Unexpected error in pingDatabase

      java.lang.IllegalArgumentException: object is not an instance of declaring class

       

      How can I do this correctly?

       

      The log says warning, but is the check done and a new connection created if the check failed?

       

      Regards

      Gunnar