Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<classpathentry kind="lib" path="lib/jline-2.14.5.jar"/>
<classpathentry kind="lib" path="lib/jna-4.1.0.jar"/>
<classpathentry kind="lib" path="lib/jna-platform-4.1.0.jar"/>
<classpathentry kind="lib" path="lib/jodd-3.6.6.jar"/>
<classpathentry kind="lib" path="lib/jodd-3.9.1.jar"/>
<classpathentry kind="lib" path="lib/js.jar"/>
<classpathentry kind="lib" path="lib/jsch-0.1.51.jar"/>
<classpathentry kind="lib" path="lib/jsch.agentproxy.connector-factory-0.0.7.jar"/>
Expand Down
Binary file removed lib/jodd-3.6.6.jar
Binary file not shown.
Binary file added lib/jodd-3.9.1.jar
Binary file not shown.
18 changes: 10 additions & 8 deletions src/openaf/plugins/JMX.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@

import openaf.AFBase;
import openaf.AFCmdBase;
import openaf.JSEngine;
import openaf.SimpleLog;
import openaf.SimpleLog.logtype;
import openaf.JSEngine.JSList;

/**
* OpenAF plugin to access remote beans through JMX
Expand Down Expand Up @@ -257,7 +259,7 @@ public void set(String attrName, Object value) throws InstanceNotFoundException,
* @throws ReflectionException
* @throws IOException
*/
public Object exec(String operationName, String[] params, String[] signature) throws InstanceNotFoundException, MBeanException, ReflectionException, IOException {
public Object exec(String operationName, Object[] params, String[] signature) throws InstanceNotFoundException, MBeanException, ReflectionException, IOException {
return mbeanCon.invoke(obj, operationName, params, signature);
}
}
Expand Down Expand Up @@ -290,19 +292,19 @@ public static Object getLocals() throws IOException {
ClassLoaderUtil.addFileToClassPath(toolsFile, ClassLoader.getSystemClassLoader());

List<VirtualMachineDescriptor> vms = VirtualMachine.list();
HashMap<String, Object> pmap = new HashMap<String, Object>();
ArrayList<HashMap<String, Object>> list = new ArrayList<HashMap<String, Object>>();
JSEngine.JSList list = AFCmdBase.jse.getNewList(AFCmdBase.jse.getGlobalscope());

for(VirtualMachineDescriptor vm : vms) {
HashMap<String, Object> p = new HashMap<String, Object>();
JSEngine.JSMap p = AFCmdBase.jse.getNewMap(AFCmdBase.jse.getGlobalscope());
p.put("id", vm.id());
p.put("name", vm.displayName());
list.add(p);
list.add(p.getMap());
}
pmap.put("Locals", list);
JSEngine.JSMap pmap = AFCmdBase.jse.getNewMap(AFCmdBase.jse.getGlobalscope());
pmap.put("Locals", list.getList());

//return AF.jsonParse(PMStringConvert.toJSON4NativeProcessing(pmap));
return pmap;
return pmap.getMap();
}
/**
* <odoc>
Expand Down Expand Up @@ -344,6 +346,6 @@ public static Object attach2Local(String id) throws IOException, AgentLoadExcept
local.put("Agent", new HashMap<String, Object>(map));

//return AF.jsonParse(PMStringConvert.toJSON4NativeProcessing(local));
return local;
return AFBase.fromJavaMap(local);
}
}