United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6234398 JMX connection provider API exception handling unclear
JDK-6234398 : JMX connection provider API exception handling unclear

Details
Type:
Enhancement
Submit Date:
2005-03-01
Status:
Resolved
Updated Date:
2010-07-29
Project Name:
JDK
Resolved Date:
2005-06-25
Component:
core-svc
OS:
generic
Sub-Component:
javax.management
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
5.0
Fixed Versions:

Related Reports

Sub Tasks

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

                                    

Comments
EVALUATION

I think the right thing to do is to throw a MalformedURLException always.  But we should confirm that, and we definitely should document it better.
###@###.### 2005-03-02 17:13:41 GMT
                                     
2005-03-02



Hardware and Software, Engineered to Work Together