Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ashee/fce7b780ea586259196c3f7ffae8410c to your computer and use it in GitHub Desktop.
Save ashee/fce7b780ea586259196c3f7ffae8410c to your computer and use it in GitHub Desktop.
Snippets for enabling JDBC drivers, deployed as modules, in JBoss / Wildfly using JBoss CLI
# PostgreSQL
/subsystem=datasources/jdbc-driver=postgres:add(driver-name=postgres,jdbc-compliant=true,driver-module-name=org.postgres.jdbc,driver-class-name=org.postgresql.Driver,driver-datasource-class-name=org.postgresql.ds.PGPoolingDataSource,xa-datasource-class=org.postgresql.xa.PGXADataSource)
# SQL Server
/subsystem=datasources/jdbc-driver=sqlserver:add(driver-name=sqlserver,jdbc-compliant=true,driver-module-name=org.jtds.jdbc,driver-class-name=net.sourceforge.jtds.jdbc.Driver,driver-datasource-class-name=net.sourceforge.jtds.jdbcx.JtdsDataSource,xa-datasource-class=net.sourceforge.jtds.jdbcx.JtdsDataSource)
# Oracle
/subsystem=datasources/jdbc-driver=oracle:add(driver-name=oracle,jdbc-compliant=true,driver-module-name=com.oracle.jdbc,driver-class-name=oracle.jdbc.OracleDriver,driver-datasource-class-name=oracle.jdbc.pool.OracleDataSource,xa-datasource-class=oracle.jdbc.xa.OracleXADataSource)
# MySQL
/subsystem=datasources/jdbc-driver=mysql:add(driver-name=mysql,jdbc-compliant=true,driver-module-name=com.mysql.jdbc,driver-class-name=com.mysql.jdbc.Driver,xa-datasource-class=com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment