activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r584783 - /activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompConnector.cpp
Date Mon, 15 Oct 2007 13:30:04 GMT
Author: tabish
Date: Mon Oct 15 06:30:04 2007
New Revision: 584783

URL: http://svn.apache.org/viewvc?rev=584783&view=rev
Log:
minor code cleanup.  Removed some commented out code etc.

Modified:
    activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompConnector.cpp

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompConnector.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompConnector.cpp?rev=584783&r1=584782&r2=584783&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompConnector.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompConnector.cpp Mon Oct
15 06:30:04 2007
@@ -198,8 +198,7 @@
         ConnectedCommand* connected =
             dynamic_cast< ConnectedCommand* >( response );
 
-        if( connected == NULL )
-        {
+        if( connected == NULL ) {
             delete response;
 
             throw StompConnectorException(
@@ -241,8 +240,8 @@
 ////////////////////////////////////////////////////////////////////////////////
 void StompConnector::disconnect()
 {
-    try
-    {
+    try {
+
         // Mark state as no longer connected.
         state = CONNECTION_STATE_DISCONNECTED;
 
@@ -263,10 +262,8 @@
     cms::Session::AcknowledgeMode ackMode )
         throw( ConnectorException )
 {
-    try
-    {
+    try {
         enforceConnected();
-
         return sessionManager->createSession( ackMode );
     }
     AMQ_CATCH_RETHROW( ConnectorException )
@@ -296,10 +293,8 @@
 void StompConnector::startConsumer(ConsumerInfo* consumer )
         throw ( ConnectorException )
 {
-    try
-    {
+    try {
         enforceConnected();
-
         return sessionManager->startConsumer(consumer);
     }
     AMQ_CATCH_RETHROW( ConnectorException )
@@ -353,10 +348,8 @@
                                          SessionInfo* session AMQCPP_UNUSED)
     throw ( ConnectorException )
 {
-    try
-    {
+    try {
         enforceConnected();
-
         return new StompTopic( name );
     }
     AMQ_CATCH_RETHROW( ConnectorException )
@@ -368,10 +361,8 @@
                                          SessionInfo* session AMQCPP_UNUSED)
     throw ( ConnectorException )
 {
-    try
-    {
+    try {
         enforceConnected();
-
         return new StompQueue( name );
     }
     AMQ_CATCH_RETHROW( ConnectorException )
@@ -383,8 +374,7 @@
     SessionInfo* session AMQCPP_UNUSED)
         throw ( ConnectorException, UnsupportedOperationException )
 {
-    try
-    {
+    try {
         throw UnsupportedOperationException(
             __FILE__, __LINE__,
             "StompConnector::createTemporaryTopic - No Stomp Support");
@@ -400,8 +390,7 @@
     SessionInfo* session AMQCPP_UNUSED)
         throw ( ConnectorException, UnsupportedOperationException )
 {
-    try
-    {
+    try {
         throw UnsupportedOperationException(
             __FILE__, __LINE__,
             "StompConnector::createTemporaryQueue - No Stomp Support");
@@ -473,8 +462,7 @@
 
         list< cms::Message* >::const_iterator itr = messages.begin();
 
-        for( ; itr != messages.end(); ++itr )
-        {
+        for( ; itr != messages.end(); ++itr ) {
             this->send( *itr, producerInfo );
         }
     }
@@ -489,19 +477,17 @@
                                   AckType ackType AMQCPP_UNUSED)
     throw ( ConnectorException )
 {
-    try
-    {
+    try {
+
         enforceConnected();
 
         // Auto to Stomp means don't do anything, so we drop it here
         // for client acknowledge we have to send and ack.
-        if( session->getAckMode() == cms::Session::CLIENT_ACKNOWLEDGE /*||
-            session->getAckMode() == cms::Session::SESSION_TRANSACTED*/ )
-        {
+        if( session->getAckMode() == cms::Session::CLIENT_ACKNOWLEDGE ) {
+
             AckCommand cmd;
 
-            if( message->getCMSMessageID() == "" )
-            {
+            if( message->getCMSMessageID() == "" ) {
                 throw StompConnectorException(
                     __FILE__, __LINE__,
                     "StompConnector::send - "
@@ -509,14 +495,6 @@
             }
 
             cmd.setMessageId( message->getCMSMessageID() );
-
-            /*if( session->getAckMode() == cms::Session::SESSION_TRANSACTED )
-            {
-                cmd.setTransactionId(
-                    Integer::toString(
-                        session->getTransactionInfo()->getTransactionId() ) );
-            }*/
-
             transport->oneway( &cmd );
         }
     }



Mime
View raw message