-
1. Re: Create datasource using CLI
beve Sep 2, 2011 12:55 PM (in response to rareddy)Hi,
Can somebody post a sample on how to create a data source using CLI?
The following example can be found on this page, if you scroll down you find this example in the section "Deploying a Datasource":
/subsystem=datasources/data-source=MigrateDS:add(jndi-name=java:jboss/datasources/MigrateDS, pool-name=MigrateDS, driver-name=h2, connection-url=jdbc:h2:mem:test;DB_CLOSE_DELAY=-1)
Regards,
/Daniel
-
2. Re: Create datasource using CLI
rareddy Sep 2, 2011 2:26 PM (in response to beve)This command is similar to one I posted. I see there is command called "data-source" in CLI, how can one use this command to create a data source?
Thank you.
Ramesh..
-
3. Re: Create datasource using CLI
beve Sep 2, 2011 4:22 PM (in response to rareddy)see there is command called "data-source" in CLI, how can one use this command to create a data source?
You can get a listing of the available options by running:
[standalone@localhost:9999 /] data-source add --help
-
4. Re: Create datasource using CLI
rareddy Sep 3, 2011 12:54 PM (in response to beve)Daniel,
Thank you very much. I never thought to put those two together the way you have showed.
I think it would have helped from the usability perspective, if the comment said that there are extensions to the command like "data-source [add|remove|modify]" to help. Or even when I issued "data-source" command print out some helpful message to show the usage rather than saying "--jndi-name" is missing, which is confusing, not helpful.
Also another observation is, for creating a queue, CLI has "add-jms-queue", "remove-jms-queue" etc, where are "data-source" takes another approach for extensions to same command, which is not consistent across the commands in the CLI.
I would be happy write up a enhancement request if anybody agrees.
Thanks.
Ramesh..
-
5. Re: Create datasource using CLI
jaikiran Sep 6, 2011 10:44 AM (in response to rareddy)Ramesh Reddy wrote:
Also another observation is, for creating a queue, CLI has "add-jms-queue", "remove-jms-queue" etc, where are "data-source" takes another approach for extensions to same command, which is not consistent across the commands in the CLI.
I would be happy write up a enhancement request if anybody agrees.
Thanks.
Ramesh..
IMO, having them consistent makes sense. So a feature request looks right.
-