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

Robert Gemmell commented on QPID-1522:
--------------------------------------

Rob Godfrey - 09/Jan/09 03:00 AM

Comments on checking r732310: 

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.

==================

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.

> Refactor Command classes so that more common code is shared. 
> -------------------------------------------------------------
>
>                 Key: QPID-1522
>                 URL: https://issues.apache.org/jira/browse/QPID-1522
>             Project: Qpid
>          Issue Type: Improvement
>          Components: Java Management : CLI Tool
>    Affects Versions: M4
>            Reporter: Aidan Skinner
>            Assignee: Aidan Skinner
>         Attachments: 
> 0001-QPID-1522-Raname-Command-class-to-CommandImpl-and-m.patch, 
> 0002-QPID-1522-Move-common-code-up-to-CommandImpl.-Renam.patch, 
> 0003-QPID-1522-Fix-spelling-error-in-classname.patch, 
> 0004-QPID-1522-Move-command-line-constants-to-individual.patch
>
>
> The Command subclasses have some duplicate code which could be shared. 

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

Reply via email to