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

JMX connection provider API exception handling unclear

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 5.0
    • Fix Version/s: 6
    • Component/s: core-svc
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b43
    • CPU:
      generic
    • OS:
      generic

      Description

      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

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: