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

[GSS](7.3.z) JDBC Drivers deployed in a custom module should depend on sun.jdk, ibm.jdk, javaee.api

XMLWordPrintable

    • EAP DOC Sprint 8:April 12 - 23

      We have seen newer JDBC drivers requiring other dependedencies.

      We should update our docs to list these as the suggested dependencies for JDBC drivers deployed in a module. A custom module in a module.xml only sees the classes in its resource-root jars and dependencies, this means classes normally visible in the JDK are not visible by default. Using dependencies as shown below will make the JDK classes visible as well as the javaee apis provided by EAP and would avoid users having issues when configuring their JDBC driver in a module.xml

          <dependencies>
              <module name="javaee.api"/>
              <module name="sun.jdk"/>
              <module name="ibm.jdk"/>
              <module name="javax.api"/>
          </dependencies>
      

      Any examples such as the mysql and the other JDBC drivers:

      <module xmlns="urn:jboss:module:1.1" name="com.mysql">
        <resources>
          <resource-root path="mysql-connector-java-8.0.12.jar"/>
        </resources>
        <dependencies>
          <module name="javax.api"/>
          <module name="javax.transaction.api"/>
        </dependencies>
      </module>
      

      Similar for the CLI commands for the example JDBC drivers:

      module add --name=com.mysql --resources=/path/to/mysql-connector-java-8.0.12.jar --dependencies=javax.api,javax.transaction.api
      

      Also if we have examples showing adding custom modules (other than JDBC), these dependencies are a good default recommendation.

      [1] https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.3/html-single/configuration_guide/index#modules

      [2] https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.3/html-single/configuration_guide/index#create_a_custom_module

              eameh1@redhat.com Emmanuel Ameh
              eameh1@redhat.com Emmanuel Ameh
              Martin Svehla Martin Svehla
              Martin Svehla Martin Svehla
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: