[jboss-dev-forums] [JBoss AS7 Development] - Create datasource using CLI

Ramesh Reddy do-not-reply at jboss.com
Fri Sep 2 12:29:59 EDT 2011


Ramesh Reddy [http://community.jboss.org/people/rareddy] created the discussion

"Create datasource using CLI"

To view the discussion, visit: http://community.jboss.org/message/624510#624510

--------------------------------------------------------------
Can somebody post a sample on how to create a data source using CLI? I checked Admin Guide, did not see any example. The help says, run command "data-source", it was not much help on what parameter it needs,  looks like you can ask for "operation-description for the command.  Can somebody give small example?

Then I tried something like

/subsystem=datasources/data-source=java\:/TestDS:add(jndi-name=java:/TestORCL, connection-url= jdbc:oracle:thin:@server:1521:orcl, driver-name=oracle, user-name=myuser, password=pass, pool-name=testorcl)


given my driver module "oracle" is deployed already, this succeeds. Now I do not see the data source created in the admin-console right away after refresh, I had to restart the server before I can see it.

I had my user-name set wrong on the data source, so I used admin-console to update the user-name and saved it. But the changes did not take effect either. Is there a refresh or persistence issue with admin-console.

Thanks

Ramesh..
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/624510#624510]

Start a new discussion in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2225]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20110902/f576a389/attachment.html 


More information about the jboss-dev-forums mailing list