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&...]