thezbyg commented on code in PR #1493:
URL: https://github.com/apache/activemq/pull/1493#discussion_r2389915659
##########
activemq-web-console/src/main/webapp/WEB-INF/tags/jms/forEachConnection.tag:
##########
@@ -23,9 +23,8 @@
<%
Iterator it = broker.getConnections(connectorName).iterator();
while (it.hasNext()) {
- String conName = (String) it.next();
- ConnectionViewMBean con = broker.getConnection(conName);
- request.setAttribute(connectionName, conName);
+ ConnectionViewMBean con = (ConnectionViewMBean) it.next();
+ request.setAttribute(connectionName, con.getClientId());
Review Comment:
@jbonofre
Connection MBeans with `connectionViewType=clientId` type use connection
`clientId` value for `connectionName` parameter, so `connectionName` MBean
parameter value and `clientId` connection property value should be equivalent.
This is the code responsible for `connectionName` value in connection MBean:
https://github.com/apache/activemq/blob/51553ddc5f4fac3cd8d89dc5cf485d5d527d60d1/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/ManagedTransportConnection.java#L84
https://github.com/apache/activemq/blob/51553ddc5f4fac3cd8d89dc5cf485d5d527d60d1/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/ManagedTransportConnection.java#L117
https://github.com/apache/activemq/blob/51553ddc5f4fac3cd8d89dc5cf485d5d527d60d1/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/BrokerMBeanSupport.java#L181
@mattrpav
If JMS allows multiple connections with same `clientId` value, then it
should have already caused problems by attempting to create multiple MBeans
with the same name. If this was not an issue before my changes, then I will
have to investigate more, because I thought that `clientId` must always be
unique and can not be shared between connections.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact