title: Java MXBean custom types
body: <p>I am trying to create an MXBean with a custom attribute, but I get javax.management.NotCompliantMBeanException
  IJmsDestinationMBean.getAttributes has parameter or return type that cannot be translated into an open type</p>
  
  <p>I have read that MXBean attributes have to be OpenType compatible.
  How would I make my attribute work this way?
  All the classes below are in the same package.</p>
  
  <pre><code>class JmsDestinationMBean implements IJmsDestinationMBean{
  
    protected JmsDestinationAttributes attributes = new JmsDestinationAttributes();
  
    @Override
    public JmsDestinationAttributes getAttributes() {
      return this.attributes;
    }
  }
  
  @MXBean
  interface IJmsDestinationMBean {
    JmsDestinationAttributes getAttributes()
  }
  
  class JmsDestinationAttributes {
  
    protected String name
    protected int messagesCurrentCount
    protected int consumersCurrentCount
  
    String getName() {
      this.name;
    }
  
    int getMessagesCurrentCount() {
      this.messagesCurrentCount;
    }
  
    int getConsumersCurrentCount() {
      this.consumersCurrentCount;
    }
  }
  </code></pre>