Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Create a file path structure under the JBOSS_HOME /modules/ directory. For example, for an Oracle JDBC driver, create a directory structure as follows: JBOSS_HOME/modules/oracle/jdbc/main/.
  2. Copy the JDBC driver JAR into the main/ subdirectory.
  3. In the main/ subdirectory, create a module. xml file:

    Code Block
    <?xml version="1.0" encoding="UTF-8"?>
    <module xmlns="urn:jboss:module:1.1" name="com.oracle">
        <resources>
            <resource-root path="ojdbc7.jar"/>
        </resources>
        <dependencies>
            <module name="javax.api"/>
            <module name="javax.transaction.api"/>
        </dependencies>
    </module>

    The directory should look like this:

  4. Start the Server:   JBOSS_HOME/bin/standalone.sh
  5. Start the Management CLI in another command window: JBOSS_HOME/bin/jboss-cli.sh --connect controller=localhost:9999
  6. Run the following CLI command to add the JDBC driver module as a driver:

    Code Block
    languagebash
    /subsystem=datasources/jdbc-driver=DRIVER_NAME:add(driver-name=DRIVER_NAME,driver-module-name=MODULE_NAME,driver-xa-datasource-class-name=XA_DATASOURCE_CLASS_NAME)

    An example for this scenario would be:

    Code Block
    languagebash
    /subsystem=datasources/jdbc-driver=oracle:add(driver-name=oracle,driver-module-name=com.oracle,driver-xa-datasource-class-name=oracle.jdbc.xa.client.OracleXADataSource)