JPPF Issue Tracker
star_faded.png
Please log in to bookmark issues
bug_report_small.png
CLOSED  Bug report JPPF-567  -  JMXDriverConnectionWrapper.getAllJobIds still exists and raises an exception
Posted Dec 18, 2018 - updated Dec 19, 2018
icon_info.png This issue has been closed with status "Closed" and resolution "RESOLVED".
Issue details
  • Type of issue
    Bug report
  • Status
     
    Closed
  • Assigned to
     lolo4j
  • Progress
       
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
  • Posted by
     lolo4j
  • Owned by
    Not owned by anyone
  • Category
    Management / Monitoring
  • Resolution
    RESOLVED
  • Priority
    Normal
  • Reproducability
    Always
  • Severity
    Normal
  • Targetted for
    icon_milestones.png JPF 6.0.2
Issue description
From this forums thread:

The method getAllJobIds() still exists in class JMXDriverConnectionWrapper, but it was removed from the DriverJobManagementMBean interface.

Using this method on a connected JMX wrapper always raises an exception:
javax.management.AttributeNotFoundException: No such attribute: AllJobIds
  at com.sun.jmx.mbeanserver.PerInterface.getAttribute(Unknown Source)
  at com.sun.jmx.mbeanserver.MBeanSupport.getAttribute(Unknown Source)
  at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(Unknown Source)
  at com.sun.jmx.mbeanserver.JmxMBeanServer.getAttribute(Unknown Source)
  at org.jppf.jmxremote.nio.JMXMessageReader.handleRequest(JMXMessageReader.java:125)
  at org.jppf.jmxremote.nio.JMXMessageReader.handleMessage(JMXMessageReader.java:98)
  at org.jppf.jmxremote.nio.JMXMessageReader.access$0(JMXMessageReader.java:95)
  at org.jppf.jmxremote.nio.JMXMessageReader$HandlingTask.run(JMXMessageReader.java:339)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
  at java.lang.Thread.run(Unknown Source)
We should remove this method from JMXDriverConnectionWrapper as well and update the documentation to reflect that, and in particular state that to achieve the same goal the following should be used:
JMXDriverConnectionWrapper jmx = ...;
String jobUuids = jmx.getJobManager().getAllJobUuids();
Steps to reproduce this issue
Use the following client-side code:
try (JMXDriverConnectionWrapper jmx = new JMXDriverConnectionWrapper("localhost", 11111)) {
  if (jmx.connectAndWait(5000L)) {
    String[] ids = jmx.getAllJobIds();
    System.out.println("ids = " + Arrays.toString(ids));
  } else System.out.println("could not connect to localhost:11111");
} catch (Exception e) {
  e.printStackTrace();
}

#3
Comment posted by
 lolo4j
Dec 19, 06:53
Fix plan:
  • in version 6.0.x, we will fix the method getAllJobIds() and deprecate it, We will remove all mentions from the doc, and replace them with getJobManager().getAllJobUuids()
  • in the upcoming version 6.1, we will remove the method. We will remove all mentions from the doc, and replace them with getJobManager().getAllJobUuids()