public void execute(String[] args) throws Exception
   {
      processArguments(args);

      if (objectName == null)
         throw new CommandException("Missing object name");

      MBeanServerConnection server = getMBeanServer();
      MBeanInfo mbeanInfo = server.getMBeanInfo(objectName);
      MBeanAttributeInfo[] attrInfo = mbeanInfo.getAttributes();
      MBeanOperationInfo[] opInfo = mbeanInfo.getOperations();

      PrintWriter out = context.getWriter();
      out.println("Description: "+mbeanInfo.getDescription());
      out.println("+++ Attributes:");
      int length = attrInfo != null ? attrInfo.length : 0;
      for(int n = 0; n < length; n ++)
      {
         MBeanAttributeInfo info = attrInfo[n];
         out.print(" Name: ");
         out.println(info.getName());
         out.print(" Type: ");
         out.println(info.getType());
         String rw = "";
         if( info.isReadable() )
            rw = "r";
         else
            rw = "-";
         if( info.isWritable() )
            rw += "w";
         else
            rw += "-";
         out.print(" Access: ");
         out.println(rw);
      }

      out.println("+++ Operations:");
      length = opInfo != null ? opInfo.length : 0;
      for(int n = 0; n < length; n ++)
      {
         MBeanOperationInfo info = opInfo[n];
         out.print(' ');
         out.print(info.getReturnType());
         out.print(' ');
         out.print(info.getName());
         out.print('(');
         MBeanParameterInfo[] sig = info.getSignature();
         for(int s = 0; s < sig.length; s ++)
         {
            out.print(sig[s].getType());
            out.print(' ');
            out.print(sig[s].getName());
            if( s < sig.length-1 )
               out.print(',');
         }
         out.println(')');
      }
      closeServer();
   }