# note that driver-name could be driver's module name if you went module approach.
/subsystem=datasources/data-source=db2DS:add(jndi-name=java:/db2DS,  driver-name=db2jcc4.jar, driver-class=com.ibm.db2.jcc.DB2Driver, connection-url=jdbc:db2://{host}:{port}/{database_name},user-name={user}, password={password})

# XA Data source
#batch
#/subsystem=datasources/xa-data-source=db2DS:add(jndi-name=java:/db2DS,  driver-name=db2jcc4.jar, xa-datasource-class=com.ibm.db2.jcc.DB2XADataSource, user-name={user}, password={password})
#/subsystem=datasources/xa-data-source=db2DS/xa-datasource-properties=DatabaseName:add(value={database_name})
#/subsystem=datasources/xa-data-source=db2DS/xa-datasource-properties=PortNumber:add(value=50000)
#/subsystem=datasources/xa-data-source=db2DS/xa-datasource-properties=ServerName:add(value={host})
#/subsystem=datasources/xa-data-source=db2DS:enable
#run-batch


## If you are working in a clustered environment, prepend "/profile=ha" to all the above commands that start with "/subsystem=.." 