Allow to configure module for custom validation classes

In  datasource jca resource-adapter

Overview

Connector subsystem allows to configure custom classes for datasource validation (exception-sorter, valid-connection-checker, stale-connection-checker). However currently there is no possibility to use custom module for those classes. This PR is going to implement it.

Configuration

'module' attribute would be added to those places of datasource subystem that are use to configure exception-sorter,valid-connection-checker and stale-connection-checker validation classes:

{code} <datasource (…​)> (…​) <validation> (…​) <valid-connection-checker class-name="someClass1" module="someModule1"/> <stale-connection-checker class-name="someClass2" module="someModule2"/> <exception-sorter class-name="someClass3" module="someModule3"/> (…​) </validation> (…​) </datasource> {code}

Issue Metadata

Issue:

Dev Contacts:

Testing by:

  • Engineering

Affected Projects or Components:

  • IronJacamar, WildFly Connector

Requirements

  • customers should be able to configure custom modules for datasource validation classes

Proposed solution

  • extend IronJacamar org.jboss.jca.common.api.metadata.common.Extension so that it can be configured with custom classloader

  • modify WildFly Connector subystem datasource configuration so that exception-sorter,valid-connection-checker and stale-connection-checker classes can be configured with custom module (by refering module classloader to appropriate extension)

Test Plan

  • An integration tests will be added to WildFly integration testsuite. The goal of the test would be to verify that classes from custom module are loaded correctly and invoked during the validation.

Community docs

  • None