-
1. Re: Jython & jboss-cli-client.jar
ctomc Feb 17, 2015 7:17 PM (in response to czacharym)just ask jar for all the options
java -jar jboss-cli-client.jar --help
--controller is what you are looking for.
you can also change that in jboss-cli.xml
-
2. Re: Jython & jboss-cli-client.jar
czacharym Feb 17, 2015 9:08 PM (in response to ctomc)Hi Tomaz,
Let me give a little more detail.
I already have the "remoting" setup in the jboss-cli.xml. The problem is whenever I connect to the JBoss server in the Jython script, I get the following warning.
WARN: can't find jboss-cli.xml. Using default configuration value.
Here is how i'm loading the jboss-cli-client.jar in the jython interactive mode.
jython -J-cp ./jboss-cli-client.jar
>>> from org.jboss.as.cli.scriptsupport import CLI
cli = cli.newInstance()
cli.connect("localhost",9030,"login","password")
At the cli.connect is where the connection fails, because its is using the default of "http-remoting" instead of "remoting" and it cannot find the jboss-cli.xml where the "remoting" is defined.
Thanks
-
3. Re: Jython & jboss-cli-client.jar
ctomc Feb 18, 2015 5:42 AM (in response to czacharym)in that case it is simpler just use different connect method.
this is the one you are looking for:
public void connect(String protocol, String controllerHost, int controllerPort, String username, char[] password)
see wildfly-core/CLI.java at master · wildfly/wildfly-core · GitHub for more details
-
4. Re: Jython & jboss-cli-client.jar
ssilvert Feb 18, 2015 8:34 AM (in response to ctomc)The API is also documented at the bottom of this page:
-
5. Re: Jython & jboss-cli-client.jar
czacharym Feb 18, 2015 8:35 AM (in response to ctomc)Thanks Tomaz ... that worked !!!
Much appreciated.
-
6. Re: Jython & jboss-cli-client.jar
czacharym Feb 18, 2015 8:40 AM (in response to ssilvert)Hi Stan,
Thanks.
Also, this link should be updated with the info that Tomaz provided with the optional (String protocol).
Currently the information from the link you provided only shows:
void
connect(String controllerHost, int controllerPort, String username, char[] password)
Connect to the server using a specified host and port.
-
7. Re: Jython & jboss-cli-client.jar
ssilvert Feb 18, 2015 1:03 PM (in response to czacharym)Thanks Carlton. It's updated now.
Stan