[jboss-dev-forums] [JBoss AS 7 Development] - jboss cli java client remote command

Julio Saura do-not-reply at jboss.com
Thu Aug 1 04:12:52 EDT 2013


Julio Saura [https://community.jboss.org/people/jsaura] created the discussion

"jboss cli java client remote command"

To view the discussion, visit: https://community.jboss.org/message/830887#830887

--------------------------------------------------------------
Hello

i have just developed a little java program ( i am not developer i am sysadmin ) 

is working great, i connect to remote controller but the problem i am facing is that i cannot send commands like "ls /host=master/server-config=server-one" cause it throws and exception saying its impossible to translate it to a command ..

what i want to do is that my program connects to controller to check if a server is started or not and if not start it on a jboss domain setup, pretty easy at first sight ....

why can´t i send this kinda commands using the jboss cli api? is there a way of doing this using the api?

in the same way i cannot start o stop a server doing 

/host=master/server-config=server-one:stop
/host=master/server-config=server-one:start

all this commands work perfectly if i connect to console using de jboss-cli.sh, but it seems i cannot send this command using my code that uses jboss cli jars ... for example

./jboss-cli.sh --connect --controller=10.12.0.108:9999 --command='ls /host=master/server-config=server-one' | grep 'status='

status=STARTED

thanks in advance
--------------------------------------------------------------

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

Start a new discussion in JBoss AS 7 Development at Community
[https://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/20130801/f3c7c3cb/attachment.html 


More information about the jboss-dev-forums mailing list