2.1.2-alpha
Pre-release
Pre-release
ferdiknight
released this
24 Dec 09:38
·
6 commits
to iteration/2.1.x
since this release
Feature
- Add one run mode :
-
mxbean : Start XPocket with mxbean mode with command,e.g sh xpocket.sh -run_mode mxbean -port 9528 -timeout 60.XPocket will start a quiet mxbean server, and can invoke commands with java mxbean remote call.
-
code example
invoke operation is used to invoke a command, xpocket only invoke the first command in the param list in this version.
stop operation is used to stop the xpocket mxbean server. when the server has accepted this operation,it will kill itself after 1s.
-
JMXServiceURL url = new JMXServiceURL(String.format("service:jmx:rmi:///jndi/rmi://localhost:%s/server",9528));
JMXConnector jmxConnector = JMXConnectorFactory.connect(url);
MBeanServerConnection msc = jmxConnector.getMBeanServerConnection();
ObjectName xpocketObjectName = new ObjectName("XPocket:name=xpocket");
String s = (String)msc.invoke(xpocketObjectName, "invoke", new String[]{"jps"}, null);
System.out.println(s);
System.out.println(msc.invoke(xpocketObjectName, "stop", null, null));
- Add scroll command collection :
- support groovy script in current version.
- scroll list list all loaded scroll in current xpocket session.
- scroll compile compile a script or script file to scroll. -name and -ns is both required, the compiled scroll is marked as name@ns for unique. scroll compile -name scrollname -ns scrollnamespace [-t type Default:groovy] [-output path] [-F file or script]
- scroll exec execute a script or script file or a compiled scroll file or a loaded scroll.scroll exec [-script -t type Default:groovy] [-F file or script]
- command example
scroll compile -name demo -ns xpocket "exec(\\"jps\\");"
scroll compile -name demo -ns xpocket -F ./demo.groovy
scroll compile -name demo -ns xpocket -F ./demo.groovy -output ./demo.scl
scroll exec -script "exec(\\"jps\\");"
scroll exec -script -F ./demo.groovy
scroll exec -F ./demo.scl
scroll exec demo@xpocket
Bugfix
Reference
Issues:
[#41] FEATURE: [scroll] groovy support in xpocket.
[#40] FEATURE:mxbean mode for integrated applications