On 21 March 2013 12:47, Tristan Tarrant <ttarrant(a)redhat.com> wrote:
For the CLI, you need to invoke the createSessionId(String
cacheName)
method on the Interpreter MBean and then use that session id for all
subsequent invocations on the execute(String sessionId, String script)
method.
The execute method returns a map which may contain the following:
OUTPUT the output of the execution of the script (roughly equivalent to
stdout)
ERROR errors which occurred during script execution (roughly equivalent
to stderr)
STACKTRACE a stacktrace in case of errors
CACHE the name of the currently selected cache for the script session
BTW it'd be nice to know what the result is (JSON / XML etc if those
are known by the CLI - such as if the 'xml' or 'json' postfixes are
used in a command) then we can do better visualisation. I've raised
this issue
https://issues.jboss.org/browse/ISPN-2961
--
James
-------
Red Hat
Email: jstracha(a)redhat.com
Web:
http://fusesource.com
Twitter: jstrachan, fusenews
Blog:
http://macstrac.blogspot.com/
Open Source Integration