# note that driver-name could be driver's module name if you went module approach.
/subsystem=datasources/data-source=derbyDS:add(jndi-name=java:/derbyDS,  driver-name=derbyclient.jar, driver-class=org.apache.derby.jdbc.ClientDriver, connection-url=jdbc:derby://{host}:1527/{db-name},user-name={user}, password={password})

# XA Data source
#batch
#/subsystem=datasources/xa-data-source=derbyDS:add(jndi-name=java:/derbyDS,  driver-name=derbyclient.jar, xa-datasource-class=org.apache.derby.jdbc.ClientXADataSource, user-name={user}, password={password})
#/subsystem=datasources/xa-data-source=derbyDS/xa-datasource-properties=DatabaseName:add(value={database_name})
#/subsystem=datasources/xa-data-source=derbyDS/xa-datasource-properties=PortNumber:add(value=1527)
#/subsystem=datasources/xa-data-source=derbyDS/xa-datasource-properties=ServerName:add(value={host})
#/subsystem=datasources/xa-data-source=derbyDS:enable
#run-batch


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