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

JMX connection provider API exception handling unclear

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P3 P3
    • 6
    • 5.0
    • core-svc
    • b43
    • generic
    • generic

      The expected behavior of a JMXConnectorProvider does not appear to be the same depending upon how the JMXConnectorProvider is invoked. The JMXConnectorProvider cannot know how it has been invoked.

      In more detail - the newJMXConnector call is expected to throw an exception
      if the provider cannot provide the requested protocol from the URL.

      If the provider is located through the classpath (as a service), the provider must throw a JMXProviderException to indicate that it is not the correct provider, I think, in any case, this usually means that a provider exists for the protocol but cannot be used. And also, a message gets logged when this happens.

      If the provider class is supplied in the connection environment, the provider must *NOT* throw a JMXProviderException and should throw another exception such as MalformedURLException.

      More javadoc and/or examples would be helpful here, and if the behavior really is inconsistent some kind of means for the provider knowing how it's being called (maybe for compatibility we could introduce something into the map to indicate usage).

      ###@###.### 2005-03-01 17:06:42 GMT

            lmalvent Luis-Miguel Alventosa (Inactive)
            nstephen Nick Stephen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: