Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-20494

[GSS](7.3.z) HAL-1715 - HAL creates datasource with incorrect default validation settings

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.3.6.CR1, 7.3.6.GA
    • 7.3.4.GA
    • Web Console
    • None
    • False
    • False
    • +
    • Undefined

      Created a simple Oracle (non-XA) datasource with no explicit configuration of validation. The below was automatically added (and the same is seen when creating an XA datasource also):

                          <validation>
                              <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleValidConnectionChecker"/>
                              <background-validation>true</background-validation>
                              <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>
      

      The above is problematic

      • Background validation is not recommended in most cases as it is less reliable than validate-on-match (since it runs periodically rather than at the point/time connections are requested from the pool). A better default would be <validate-on-match>true</validate-on-match> with background-validation disabled. Background validation should typically be used only if explicit testing verifies that validate-on-match noticeably impacts performance for end-users.
      • Using background-validation without background-validation-millis > 0 will not enable background validation.
      • Stale connection checkers are rarely needed (only relevant if applications are explicitly coded to handle StaleConnectionException) so it doesn't really make sense to configure one by default.

              chaowan@redhat.com Chao Wang
              rhn-support-sfikes Stephen Fikes (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: