Uploaded image for project: 'HAL'
  1. HAL
  2. HAL-1720

MYSQL Datasource create with incorrect default validation settings

    XMLWordPrintable

Details

    Description

      In WildFly 21.0.0, created a simple MYSQL (non-XA) datasource with no explicit configuration of validation. The below was automatically added:

      <validation>
       <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLValidConnectionChecker"/>
       <background-validation>true</background-validation>
       <exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLExceptionSorter"/>
       </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.

      Attachments

        Activity

          People

            rhn-support-anijhawa1 Amit Nijhawan (Inactive)
            rhn-support-anijhawa1 Amit Nijhawan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: