Adding a JDBC 4 driver module
First of all, we need to download the JDBC 4-compliant driver from the database vendor site. In our case, as previously mentioned, our database is a MySQL 5 server, so we will download the MySQL 5 connector from the following site: https://dev.mysql.com/downloads/connector/j/.
In case you need the direct link to the bundle, visit the following link: https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.38.zip.
Now extract the archive and open the JBoss EAP 7 CLI, as follows:
unzip /opt/rh/mysql-connector-java-5.1.38.zip -d /tmp cd $JBOSS_HOME ./bin/jboss-cli.sh module add --name=com.mysql --slot=main --resources=/tmp/mysql- connector-java-5.1.38/mysql-connector-java-5.1.38-bin.jar --dependencies=javax.api,javax.transaction.api
This will automatically create the path folder com/mysql
under the modules
folder of $JBOSS_HOME
, and it will also copy the resource mysql-connector-java-5.1.38-bin.jar
into it.
Additionally, a module.xml
file descriptor...