1 Reply Latest reply on Aug 14, 2014 3:02 PM by Frank Langelage

    How do I specify a datasource driver class in my standalone.xml file?

    D. Alvarado Newbie




      I’m using JBoss 7.1.3.  I’m troubleshooting an issue related to setting up a MySQL replication JDBC URL and I was curious, how do you specify what driver class your data source should use?  We use MySQL 5.5.37 and even though I set the driver class element to a bogus value, everything still loads fine (from $JBOSS_HOME/standalone/configuration/standalone.xml).  I would expect the below invalid driver class to cause an exception but it does not ...



                      <datasource jndi-name="java:jboss/datasources/MySqlDS" pool-name="MySqlDS" enabled="true" use-java-context="true">



















                          <driver name="mysql" module="com.mysql">



                          <driver name="h2" module="com.h2database.h2">







      We have the MySql connector JAR loaded in $JBOSS_HOME/modules.  The library is mysql-connector-java-5.1.22-bin.jar, but I think there’s some other element in my standalone.xml that I need to configure to point to the driver I want.



      Thanks, -