0 Replies Latest reply on Feb 1, 2013 9:19 AM by techsjs2012

    Using CLI how do I add JDBC Module, Driver and JNDI mapping

    techsjs2012

      Using CLI how do I add JDBC Module, Driver and JNDI mapping.

       

      Below is my script and it looks like everything works but the line that does the "module add"

       

      if I comment out that line and move the JDBC driver into modules by hand it works but I would like to get the "module add" line working

       

      Below is my script

      #

      # this is my add script

      #

      connect

      module add --name=com.mysql.jdbc --resources=\/home\/jsmith\/tmp\/mysql-connector-java-5.1.21.jar --dependencies=javax.api,javax.transaction.api

       

      /subsystem=datasources/jdbc-driver=mysql:add(driver-module-name=com.mysql.jdbc,driver-name=mysql,driver-xa-datasource-class-name=com.mysql.jdbc.jdbc2.optional.MysqlXADataSource)

      /subsystem=datasources/data-source=mysql:add(jndi-name="java:jboss/datasources/mySQLDB",use-java-context=true,user-name=jboss,password=jboss,connection-url="jdbc:jdbc://127.0.0.1/jboss",min-pool-size=20,max-pool-size=50,driver-name=mysql,flush-strategy=FailingConnectionOnly)

      data-source enable --name=mysql

       

      Here is the error I am getting:

      Unexpected command 'module add --name=com.mysql.jdbc --resources=\/home\/jsmith\/tmp\/mysql-connector-java-5.1.21.jar --dependencies=javax.api,javax.transaction.api'. Type 'help --commands' for the list of supported commands

       

      thanks