Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6750935

The expected NotCompliantMBeanException is not thrown for the custom MXBeanMappingFactory

XMLWordPrintable

    • 7
    • b38
    • generic
    • generic
    • Verified

      The MXBean spec says:
      "
        . . .
      Otherwise, if the MXBean interface has an MXBeanMappingFactoryClass annotation, then that annotation must identify a subclass of MXBeanMappingFactory with a no-argument constructor. Then f is the result of calling this constructor. *If the class does not have a no-argument constructor, or if calling the constructor produces an exception, then the MXBean is invalid and an attempt to register it in the MBean Server will produce a NotCompliantMBeanException.*
        . . .
      "

        An attempt to register such MXBean (which interface is annotated with @MXBeanMappingFactoryClass defining a class that either does not have a no-argument constructor, or calling the constructor produces an exception) causes:
       
      "java.lang.IllegalArgumentException: Could not instantiate MXBeanMappingFactory javasoft.sqe.tests..."

            emcmanus Eamonn McManus
            ashusher Alexander Shusherov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: