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 customer how it's being called (maybe for compatibility we could introduce something into the map to indicate usage).
xxxxx@xxxxx 2005-03-01 17:06:42 GMT