You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2009/03/18 15:34:02 UTC

svn commit: r755604 - /activemq/activemq-cpp/branches/activemq-cpp-2.x/src/main/activemq/core/ActiveMQSession.cpp

Author: tabish
Date: Wed Mar 18 14:34:02 2009
New Revision: 755604

URL: http://svn.apache.org/viewvc?rev=755604&view=rev
Log:
https://issues.apache.org/activemq/browse/AMQCPP-229

Modified:
    activemq/activemq-cpp/branches/activemq-cpp-2.x/src/main/activemq/core/ActiveMQSession.cpp

Modified: activemq/activemq-cpp/branches/activemq-cpp-2.x/src/main/activemq/core/ActiveMQSession.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/branches/activemq-cpp-2.x/src/main/activemq/core/ActiveMQSession.cpp?rev=755604&r1=755603&r2=755604&view=diff
==============================================================================
--- activemq/activemq-cpp/branches/activemq-cpp-2.x/src/main/activemq/core/ActiveMQSession.cpp (original)
+++ activemq/activemq-cpp/branches/activemq-cpp-2.x/src/main/activemq/core/ActiveMQSession.cpp Wed Mar 18 14:34:02 2009
@@ -371,6 +371,12 @@
                 "ActiveMQSession::createQueue - Session Already Closed" );
         }
 
+        if( queueName == "" ) {
+            throw ActiveMQException(
+                __FILE__, __LINE__,
+                "ActiveMQSession::createQueue - Destination name cannot be empty.");
+        }
+
         cms::Queue* queue = connection->getConnectionData()->
             getConnector()->createQueue( queueName, sessionInfo );
 
@@ -397,6 +403,12 @@
                 "ActiveMQSession::createTopic - Session Already Closed");
         }
 
+        if( topicName == "" ) {
+            throw ActiveMQException(
+                __FILE__, __LINE__,
+                "ActiveMQSession::createTopic - Destination name cannot be empty.");
+        }
+
         cms::Topic* topic = connection->getConnectionData()->
             getConnector()->createTopic( topicName, sessionInfo );