coheigea commented on a change in pull request #465: Fix issue where the 
registry lookup was a hardcoded name and didn't a…
URL: https://github.com/apache/activemq/pull/465#discussion_r381335763
 
 

 ##########
 File path: 
activemq-broker/src/main/java/org/apache/activemq/broker/jmx/ManagementContext.java
 ##########
 @@ -690,10 +690,17 @@ public JmxRegistry(int port) throws RemoteException {
             super(port);
         }
 
-        @Override
+        private String getLookupName() {
+            if (getConnectorPath() == null || getConnectorPath().length() == 
0) {
+                return LOOKUP_NAME;
+            }
 
+            return getConnectorPath().replaceAll("^/+", "").replaceAll("/+$", 
"");
 
 Review comment:
   As getConnectorPath doesn't change, I guess it would make sense to only 
perform these regex's once (on setConnectorPath?)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to