You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Robert Gemmell (JIRA)" <qp...@incubator.apache.org> on 2009/01/19 00:43:59 UTC

[jira] Commented: (QPID-1570) JMXConnectionFactory exception handling code is fragile

    [ https://issues.apache.org/jira/browse/QPID-1570?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12665017#action_12665017 ] 

Robert Gemmell commented on QPID-1570:
--------------------------------------

As Rob has correctly pointed out, there is some reliance in the JMXConnectionFactory on knowledge of what the servers behaviour is, and if this was changed in future (eg by adding new SASL capabilities to the broker) then the functionality could be broken. However, the SASL capabilities referenced in this area are specific to the JMXMP-based JMXConnectorServer started by the broker, which has been implemented previously in a way which demanded the management console posess such knowledge, with no actual negotiation of capabilities occurring. Currently the intention is to remove the JMXMP based connector from future brokers as it requires a 3rd party download to use and is not user friendly, replacing it by establishing authentication and SSL encryption on the RMI based JMXConnectorServer used by the broker. As a result, the area of the JMXConnectionFactory under consideration here will then be used purely for connecting to any older brokers configured using the JMXMP connector, which do exhibit the behaviour upon which the code is dependant.

With the above discussed, all concerned seem to be in agreement it is not a big issue going forward.

> JMXConnectionFactory exception handling code is fragile
> -------------------------------------------------------
>
>                 Key: QPID-1570
>                 URL: https://issues.apache.org/jira/browse/QPID-1570
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Management : CLI Tool, Java Management : JMX Console
>    Affects Versions: M4
>            Reporter: Aidan Skinner
>
> Split off from QPID-1522:
> Rob Godfrey:
> JMXConnectionFactory:
> The code which looks at the exception text seems remarkable fragile to me... At the very least I would expect some constants which could be shared with the code that throws the exception.
> Robbie Gemmell:
> Hi Rob,
> I wrote that bit originally. It is somewhat fragile, but unfortunately having looked at the code that generates the exceptions i didnt think there was much else i could do. The exception is generated by code within the optional JMXMP addon (jmxremote_optional.jar) and just directly throws an IOException like so:
> throw new IOException("The server supported profiles " +
> serverProfilesList + " do not " +
> "match the client required profiles " +
> clientProfilesList + ".");
> so there are no constants to match against (though granted i should possibly still have used constants for my own bit).
> I have a secure RMI based JMX setup ready to go, so we can remove the user-unfriendly/slightly-proprietary JMXMP stuff in future if desired (I know Aidan wants to :P), and if so then that section of code should only really ever be getting used for connecting to older brokers if they have used the JMXMP based solution, which it seems that at the moment many dont, given how guff the console was in that area.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.