Skip to content

Commit 2988d5f

Browse files
cshannonjgallimore
authored andcommitted
Prevent a VM transport from being used with BrokerView (apache#1845)
This prevents a VM transport URI from being used when adding a connector or a network connector through the Broker MBean (cherry picked from commit ef53b5b)
1 parent 58dd36a commit 2988d5f

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

  • activemq-broker/src/main/java/org/apache/activemq/broker/jmx
  • activemq-unit-tests/src/test/java/org/apache/activemq/broker/jmx

activemq-broker/src/main/java/org/apache/activemq/broker/jmx/BrokerView.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -579,10 +579,8 @@ private static void validateAllowedUri(URI uri, int depth) throws URISyntaxExcep
579579
}
580580
}
581581

582-
// We don't allow VM transport scheme to be used
583-
private static void validateAllowedScheme(String scheme) {
584-
if (scheme.equals("vm")) {
585-
throw new IllegalArgumentException("VM scheme is not allowed");
586-
}
582+
@Override
583+
public long getTotalMaxUncommittedExceededCount() {
584+
return safeGetBroker().getDestinationStatistics().getMaxUncommittedExceededCount().getCount();
587585
}
588586
}

activemq-unit-tests/src/test/java/org/apache/activemq/broker/jmx/MBeanTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2072,5 +2072,4 @@ public void testAddVmConnectorBlockedBrokerView() throws Exception {
20722072
}
20732073

20742074
}
2075-
20762075
}

0 commit comments

Comments
 (0)