Datasources
This is a list of handy datasource commands that can be issued using the datasource alias:
- Add a datasource:
data-source add --jndi-name=java:/MySqlDS --name=MySQLPool --connection-url=jdbc:mysql://localhost:3306/MyDB --driver-name=mysql-connector-java-5.1.16-bin.jar --user-name=myuser --password=password –max-pool-size=30
- Remove a datasource:
data-source remove --name=java:/MySqlDS
Datasources (using operations on resources)
You can also operate on a datasource using operations on the data sources subsystem:
- List the installed drivers:
/subsystem=datasources:installed-drivers-list
- Add a datasource:
data-source add --jndi-name=java:/MySqlDS --name=MySQLPool --connection-url=jdbc:mysql://localhost:3306/MyDB --driver-name=mysql-connector-java-5.1.30-bin.jar ...
Get WildFly Configuration, Deployment, and Administration - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.