Last active
October 24, 2016 18:40
-
-
Save ehsanullahjan/ce6085038552f9a66673 to your computer and use it in GitHub Desktop.
Snippets for enabling JDBC drivers, deployed as modules, in JBoss / Wildfly using JBoss CLI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# PostgreSQL | |
if (outcome != success) of /subsystem=datasources/jdbc-driver=postgres:read-resource | |
/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) | |
end-if | |
# SQL Server | |
if (outcome != success) of /subsystem=datasources/jdbc-driver=sqlserver:read-resource | |
/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) | |
end-if | |
# Oracle | |
if (outcome != success) of /subsystem=datasources/jdbc-driver=oracle:read-resource | |
/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) | |
end-if | |
# MySQL | |
if (outcome != success) of /subsystem=datasources/jdbc-driver=mysql:read-resource | |
/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) | |
end-if |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment