Java Reference
In-Depth Information
Using the command-line interface to create a new data
source
The application server provides more than one option to add a data source to your
configuration. We will just mention the command-line-interface approach, which can
be quite useful, especially if you plan to modify your configuration using script files.
Launch the jboss-cli.sh script (or jboss-cli.bat ) and connect to the applic-
ation server.
[disconnected /] connect
[standalone@localhost:9999 /]
Now issue the following command, which actually creates a new data source, ac-
complishing the same goal we obtained by editing the configuration file:
/subsystem=datasources/
data-source=jbossas7development:add(jndi-name=java:jboss/
datasources/jbossas7development,
driver-name=mysql, connection-url=
jdbc:mysql://localhost:3306/as7development
,user-name="jboss",password="jboss")
Search WWH ::




Custom Search