title: No operation found on MBean
body: <p>Basically I am following the standard basic JMX tutorial and registering a MXBean with two methods.</p>
  
  <pre><code>public interface QueueSamplerMXBean {
      public QueueSample getQueueSample();
      public void clearQueue();
  }
  </code></pre>
  
  <p>However, when I try to query the registered MBean, it only returns the clearQueue. Here is my sample program:</p>
  
  <pre><code>MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
  
  // Construct the ObjectName for the QueueSampler MXBean we will register
  ObjectName mxbeanName = new ObjectName("com.example:type=QueueSampler");
  
  // Create the Queue Sampler MXBean
  Queue&lt;String&gt; queue = new ArrayBlockingQueue&lt;String&gt;(10);
  queue.add("Request-1");
  queue.add("Request-2");
  queue.add("Request-3");
  QueueSampler mxbean = new QueueSampler(queue);
  
  // Register the Queue Sampler MXBean
  mbs.registerMBean(mxbean, mxbeanName);
  
  MBeanInfo info = mbs.getMBeanInfo(mxbeanName);
  for(MBeanOperationInfo op : info.getOperations()) {
      System.out.println("operation = " + op.getName());
  }
  </code></pre>
  
  <p>I think this is the reason why I keeps getting "java.lang.IllegalArgumentException. ... No operation XXXXXX(method name invoked) found on MBean ..... I am getting this exception while trying to invoke the MXBean method through Jolokia agent (JSON to JMX bridge). I have no problem invoking methods with void return type.</p>
  
  <p>Anyone have any clues why getOperations does NOT return me the method with an JavaBean object as a return type? This is so weird. I must be missing something really simple.</p>
  
  <p>Thanks!</p>