title: How to programmatically check JMX MBean operations and attributes?
body: <p>Suppose we have a MBean that has the following attributes and operations.</p>
  
  <p>Attributes:
  name
  size</p>
  
  <p>Operations:
  getName()
  getSize()</p>
  
  <p>Is there a way to programmatically check for the attributes and operations?  I've been working with the IBM WebSphere MBeans and their documentation isn't very good.</p>
  
  <p>For example, if you go to <a href="http://publib.boulder.ibm.com/infocenter/wasinfo/v7r0/index.jsp" rel="noreferrer" title="IBM WAS7 InfoCenter">IBMs Infocenter</a> and navigate to Network Deployment -> Reference -> Programming interfaces -> Mbean interfaces -> ThreadPool.  They only have attributes listed and no operations.</p>
  
  <p>Using the WebSphere wsadmin tool, I can actually check to see the operations and attributes.  I'd like to know if there's a way to do this with all MBeans.</p>
  
  <pre><code>wsadmin&gt;print Help.attributes(object)
  Attribute                       Type                            Access
  name                            java.lang.String                RO
  maximumSize                     int                             RW
  minimumSize                     int                             RW
  inactivityTimeout               long                            RW
  growable                        boolean                         RW
  stats                           javax.management.j2ee.statistics.Stats  RO
  
  wsadmin&gt;print Help.operations(object)
  Operation
  java.lang.String getName()
  int getMaximumPoolSize()
  void setMaximumPoolSize(int)
  int getMinimumPoolSize()
  void setMinimumPoolSize(int)
  long getKeepAliveTime()
  void setKeepAliveTime(long)
  boolean isGrowAsNeeded()
  void setGrowAsNeeded(boolean)
  javax.management.j2ee.statistics.Stats getStats()
  </code></pre>