[hornetq-commits] JBoss hornetq SVN: r11731 - branches/Branch_2_2_EAP/src/main/org/hornetq/core/protocol/stomp.

do-not-reply at jboss.org do-not-reply at jboss.org
Mon Nov 21 15:42:38 EST 2011


Author: clebert.suconic at jboss.com
Date: 2011-11-21 15:42:38 -0500 (Mon, 21 Nov 2011)
New Revision: 11731

Modified:
   branches/Branch_2_2_EAP/src/main/org/hornetq/core/protocol/stomp/StompProtocolManager.java
Log:
Stomp to throw exception on inexistent destination = HORNETQ-799

Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/core/protocol/stomp/StompProtocolManager.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/core/protocol/stomp/StompProtocolManager.java	2011-11-21 15:01:40 UTC (rev 11730)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/core/protocol/stomp/StompProtocolManager.java	2011-11-21 20:42:38 UTC (rev 11731)
@@ -53,6 +53,10 @@
 {
    // Constants -----------------------------------------------------
 
+   private static final SimpleString JMS_TOPIC_PREFIX = new SimpleString("jms.topic");
+
+   private static final SimpleString JMS_QUEUE_PREFIX = new SimpleString("jms.queue");
+
    private static final Logger log = Logger.getLogger(StompProtocolManager.class);
 
    // TODO use same value than HornetQConnection
@@ -588,7 +592,7 @@
     */
    private void validateDestination(SimpleString address) throws Exception, HornetQException
    {
-      if (!address.equals(managementAddress))
+      if ((address.startsWith(JMS_QUEUE_PREFIX) || address.startsWith(JMS_TOPIC_PREFIX)) && !address.equals(managementAddress))
       {
          Bindings binding = server.getPostOffice().lookupBindingsForAddress(address);
          if (binding == null || binding.getBindings().size() == 0)



More information about the hornetq-commits mailing list