Skip to content

Commit bde4c08

Browse files
committed
AMQ-9644: Don't allow create a queue when browsing (force to create the queue first) in the webconsole
1 parent 78ee343 commit bde4c08

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

activemq-web/src/main/java/org/apache/activemq/web/QueueBrowseQuery.java

+7
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,13 @@ public void setBrowser(QueueBrowser browser) {
5858

5959
public Queue getQueue() throws JMSException {
6060
if (queue == null) {
61+
try {
62+
if (getBrokerFacade().getQueue(getValidDestination()) == null) {
63+
throw new IllegalArgumentException("Queue " + getValidDestination() + " doesn't exist");
64+
}
65+
} catch (Exception e) {
66+
throw new JMSException(e.getMessage());
67+
}
6168
queue = getSession().createQueue(getValidDestination());
6269
}
6370
return queue;

0 commit comments

Comments
 (0)