activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r593929 [3/7] - in /activemq/activemq-cpp/trunk/src: main/activemq/connector/ main/activemq/connector/openwire/ main/activemq/connector/openwire/commands/ main/activemq/connector/openwire/marshal/ main/activemq/connector/openwire/utils/ mai...
Date Sun, 11 Nov 2007 16:52:54 GMT
Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQTempTopic.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQTempTopic.cpp?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQTempTopic.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQTempTopic.cpp Sun Nov 11 08:52:45 2007
@@ -23,8 +23,7 @@
 using namespace activemq::connector::openwire::commands;
 
 ////////////////////////////////////////////////////////////////////////////////
-ActiveMQTempTopic::ActiveMQTempTopic() : ActiveMQTempDestination()
-{
+ActiveMQTempTopic::ActiveMQTempTopic() : ActiveMQTempDestination() {
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -33,8 +32,7 @@
 {}
 
 ////////////////////////////////////////////////////////////////////////////////
-ActiveMQTempTopic::~ActiveMQTempTopic()
-{
+ActiveMQTempTopic::~ActiveMQTempTopic() {
     try {
         this->close();
     }
@@ -42,8 +40,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-unsigned char ActiveMQTempTopic::getDataStructureType() const
-{
+unsigned char ActiveMQTempTopic::getDataStructureType() const {
     return ActiveMQTempTopic::ID_ACTIVEMQTEMPTOPIC;
 }
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQTempTopic.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQTempTopic.h?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQTempTopic.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQTempTopic.h Sun Nov 11 08:52:45 2007
@@ -34,8 +34,7 @@
 namespace commands{
 
     class ActiveMQTempTopic : public ActiveMQTempDestination,
-                              public cms::TemporaryTopic
-    {
+                              public cms::TemporaryTopic {
     public:
 
         const static unsigned char ID_ACTIVEMQTEMPTOPIC = 103;
@@ -72,7 +71,7 @@
          * Converts the Destination Name into a String
          * @return string name
          */
-        virtual std::string toString(void) const {
+        virtual std::string toString() const {
             std::ostringstream stream;
 
             stream << "Begin Class = ActiveMQTempTopic" << std::endl;
@@ -106,7 +105,7 @@
          * Retrieve the Destination Type for this Destination
          * @return The Destination Type
          */
-        virtual cms::Destination::DestinationType getDestinationType(void) const {
+        virtual cms::Destination::DestinationType getDestinationType() const {
             return cms::Destination::TEMPORARY_TOPIC;
         }
 
@@ -116,7 +115,7 @@
          * necessarily equal to the User Supplied name of the Destination
          * @return Provider specific Name
          */
-        virtual std::string toProviderString(void) const {
+        virtual std::string toProviderString() const {
             return this->getPhysicalName();
         }
 
@@ -125,7 +124,7 @@
          * copy of this one, and returns it.
          * @returns cloned copy of this object
          */
-        virtual cms::Destination* clone(void) const {
+        virtual cms::Destination* clone() const {
             return dynamic_cast<cms::Destination*>(
                 this->cloneDataStructure() );
         }
@@ -155,9 +154,15 @@
          * Gets the name of this topic.
          * @return The topic name.
          */
-        virtual std::string getTopicName(void)
+        virtual std::string getTopicName()
             const throw( cms::CMSException ) {
+        	
+            try{
                 return this->getPhysicalName();
+            }
+            AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
+            AMQ_CATCH_EXCEPTION_CONVERT( decaf::lang::Exception, exceptions::ActiveMQException )
+            AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
         }
 
         /**
@@ -165,7 +170,12 @@
          * @throws CMSException
          */
         virtual void destroy() throw ( cms::CMSException ) {
-            close();
+            try{
+                close();
+            }
+            AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
+            AMQ_CATCH_EXCEPTION_CONVERT( decaf::lang::Exception, exceptions::ActiveMQException )
+            AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
         }
 
     };

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQTextMessage.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQTextMessage.cpp?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQTextMessage.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQTextMessage.cpp Sun Nov 11 08:52:45 2007
@@ -21,24 +21,23 @@
 
 using namespace std;
 using namespace activemq;
+using namespace activemq::exceptions;
 using namespace activemq::connector;
 using namespace activemq::connector::openwire;
 using namespace activemq::connector::openwire::commands;
+using namespace decaf::lang;
 
 ////////////////////////////////////////////////////////////////////////////////
 ActiveMQTextMessage::ActiveMQTextMessage() :
-    ActiveMQMessageBase<cms::TextMessage>()
-{
+    ActiveMQMessageBase<cms::TextMessage>() {
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-ActiveMQTextMessage::~ActiveMQTextMessage()
-{
+ActiveMQTextMessage::~ActiveMQTextMessage() {
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-unsigned char ActiveMQTextMessage::getDataStructureType() const
-{
+unsigned char ActiveMQTextMessage::getDataStructureType() const {
     return ActiveMQTextMessage::ID_ACTIVEMQTEXTMESSAGE;
 }
 
@@ -52,8 +51,9 @@
 
         return std::string( (const char*)&getContent()[4], getContent().size()-4 );
     }
-    AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
-    AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -61,8 +61,9 @@
     try{
         setText( std::string(msg) );
     }
-    AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
-    AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -76,6 +77,7 @@
         dos.writeInt( (int)msg.length() );
         dos.write( (const unsigned char*)msg.c_str(), 0, msg.length() );
     }
-    AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
-    AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
 }

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQTextMessage.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQTextMessage.h?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQTextMessage.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQTextMessage.h Sun Nov 11 08:52:45 2007
@@ -34,8 +34,7 @@
 namespace commands{
 
     class ActiveMQTextMessage :
-        public ActiveMQMessageBase<cms::TextMessage>
-    {
+        public ActiveMQMessageBase<cms::TextMessage> {
     public:
 
         const static unsigned char ID_ACTIVEMQTEXTMESSAGE = 28;

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQTopic.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQTopic.cpp?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQTopic.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQTopic.cpp Sun Nov 11 08:52:45 2007
@@ -23,8 +23,7 @@
 using namespace activemq::connector::openwire::commands;
 
 ////////////////////////////////////////////////////////////////////////////////
-ActiveMQTopic::ActiveMQTopic() : ActiveMQDestination()
-{
+ActiveMQTopic::ActiveMQTopic() : ActiveMQDestination() {
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -33,13 +32,10 @@
 {}
 
 ////////////////////////////////////////////////////////////////////////////////
-ActiveMQTopic::~ActiveMQTopic()
-{
+ActiveMQTopic::~ActiveMQTopic() {
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-unsigned char ActiveMQTopic::getDataStructureType() const
-{
+unsigned char ActiveMQTopic::getDataStructureType() const {
     return ActiveMQTopic::ID_ACTIVEMQTOPIC;
 }
-

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQTopic.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQTopic.h?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQTopic.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQTopic.h Sun Nov 11 08:52:45 2007
@@ -24,6 +24,8 @@
 #endif
 
 #include <activemq/connector/openwire/commands/ActiveMQDestination.h>
+#include <activemq/exceptions/ActiveMQException.h>
+#include <decaf/lang/Exception.h>
 #include <cms/Topic.h>
 #include <vector>
 #include <string>
@@ -34,8 +36,7 @@
 namespace commands{
 
     class ActiveMQTopic : public ActiveMQDestination,
-                          public cms::Topic
-    {
+                          public cms::Topic {
     public:
 
         const static unsigned char ID_ACTIVEMQTOPIC = 101;
@@ -107,7 +108,7 @@
          * Retrieve the Destination Type for this Destination
          * @return The Destination Type
          */
-        virtual cms::Destination::DestinationType getDestinationType(void) const {
+        virtual cms::Destination::DestinationType getDestinationType() const {
             return cms::Destination::TOPIC;
         }
 
@@ -126,7 +127,7 @@
          * copy of this one, and returns it.
          * @returns cloned copy of this object
          */
-        virtual cms::Destination* clone(void) const {
+        virtual cms::Destination* clone() const {
             return dynamic_cast<cms::Destination*>(
                 this->cloneDataStructure() );
         }
@@ -158,7 +159,13 @@
          */
         virtual std::string getTopicName(void)
             const throw( cms::CMSException ) {
+
+            try{
                 return this->getPhysicalName();
+            }
+            AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
+            AMQ_CATCH_EXCEPTION_CONVERT( decaf::lang::Exception, exceptions::ActiveMQException )
+            AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
         }
 
     };

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/BrokerError.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/BrokerError.h?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/BrokerError.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/BrokerError.h Sun Nov 11 08:52:45 2007
@@ -28,13 +28,12 @@
 namespace connector{
 namespace openwire{
 namespace commands{
-           
+
     /**
      * This class represents an Exception sent from the Broker.  The Broker
      * sends java Throwables, so we must mimic its structure here.
      */
-    class BrokerError : public BaseCommand<transport::Command>
-    {
+    class BrokerError : public BaseCommand<transport::Command> {
     public:
 
         struct StackTraceElement
@@ -72,26 +71,26 @@
             BrokerError* error = new BrokerError();
             error->copyDataStructure( this );
             return error;
-        }            
-        
+        }
+
         /**
          * Copy the contents of the passed object into this objects
          * members, overwriting any existing data.
          * @return src - Source Object
          */
         virtual void copyDataStructure( const DataStructure* src ) {
-            
+
             const BrokerError* srcErr = dynamic_cast<const BrokerError*>( src );
-            
+
             if( srcErr == NULL || src == NULL ) {
                 throw decaf::lang::exceptions::NullPointerException(
                     __FILE__, __LINE__,
                     "BrokerError::copyCommand - src is NULL or invalid" );
-            } 
-            
+            }
+
             this->setMessage( srcErr->getMessage() );
             this->setExceptionClass( srcErr->getExceptionClass() );
-            
+
             for( unsigned int i = 0; i < srcErr->getStackTraceElements().size(); ++i ) {
                 if( srcErr->getStackTraceElements()[i] != NULL ) {
                     StackTraceElement* element = new StackTraceElement;
@@ -101,9 +100,9 @@
                     this->stackTraceElements.push_back( element );
                 }
             }
-            
+
             if( srcErr->getCause() ) {
-                this->cause = dynamic_cast<BrokerError*>( 
+                this->cause = dynamic_cast<BrokerError*>(
                     srcErr->getCause()->cloneDataStructure() );
             }
         }
@@ -115,7 +114,7 @@
         virtual const std::string& getMessage() const {
             return message;
         }
-        
+
         /**
          * Sets the string that contains the error Message
          * @param message - String Error Message
@@ -147,7 +146,7 @@
         virtual BrokerError* getCause() const {
             return cause;
         }
-        
+
         /**
          * Sets the Broker Error that caused this exception
          * @param cause - Broker Error
@@ -163,7 +162,7 @@
         virtual const std::vector<StackTraceElement*>& getStackTraceElements() const {
             return stackTraceElements;
         }
-        
+
         /**
          * Sets the Stack Trace Elements for this Exception
          * @param stackTraceElements - Stack Trace Elements
@@ -171,7 +170,7 @@
         virtual void setStackTraceElements( const std::vector<StackTraceElement*>& stackTraceElements ) {
             this->stackTraceElements = stackTraceElements;
         }
-        
+
     private:
 
         std::string message;

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/WireFormatInfo.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/WireFormatInfo.cpp?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/WireFormatInfo.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/WireFormatInfo.cpp Sun Nov 11 08:52:45 2007
@@ -46,8 +46,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-WireFormatInfo::~WireFormatInfo()
-{
+WireFormatInfo::~WireFormatInfo() {
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -69,7 +68,6 @@
     const WireFormatInfo* srcPtr = dynamic_cast<const WireFormatInfo*>( src );
 
     if( srcPtr == NULL || src == NULL ) {
-
         throw NullPointerException(
             __FILE__, __LINE__,
             "WireFormatInfo::copyDataStructure - src is NULL or invalid" );

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/BaseDataStreamMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/BaseDataStreamMarshaller.cpp?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/BaseDataStreamMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/BaseDataStreamMarshaller.cpp Sun Nov 11 08:52:45 2007
@@ -54,7 +54,7 @@
         return wireFormat->tightUnmarshalNestedObject( dataIn, bs );
     }
     AMQ_CATCH_RETHROW( IOException )
-    AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException )
     AMQ_CATCHALL_THROW( IOException )
 }
 
@@ -69,7 +69,7 @@
         return wireFormat->tightMarshalNestedObject1( data, bs );
     }
     AMQ_CATCH_RETHROW( IOException )
-    AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException )
     AMQ_CATCHALL_THROW( IOException )
 }
 
@@ -85,7 +85,7 @@
         wireFormat->tightMarshalNestedObject2( data, dataOut, bs );
     }
     AMQ_CATCH_RETHROW( IOException )
-    AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException )
     AMQ_CATCHALL_THROW( IOException )
 }
 
@@ -100,7 +100,7 @@
         wireFormat->looseMarshalNestedObject( data, dataOut );
     }
     AMQ_CATCH_RETHROW( IOException )
-    AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException )
     AMQ_CATCHALL_THROW( IOException )
 }
 
@@ -113,7 +113,7 @@
         return wireFormat->looseUnmarshalNestedObject( dataIn );
     }
     AMQ_CATCH_RETHROW( IOException )
-    AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException )
     AMQ_CATCHALL_THROW( IOException )
 }
 
@@ -128,7 +128,7 @@
         return wireFormat->tightMarshalNestedObject1( object, bs );
     }
     AMQ_CATCH_RETHROW( IOException )
-    AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException )
     AMQ_CATCHALL_THROW( IOException )
 }
 
@@ -144,7 +144,7 @@
         wireFormat->tightMarshalNestedObject2( object, dataOut, bs );
     }
     AMQ_CATCH_RETHROW( IOException )
-    AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException )
     AMQ_CATCHALL_THROW( IOException )
 }
 
@@ -159,7 +159,7 @@
         return wireFormat->tightUnmarshalNestedObject( dataIn, bs );
     }
     AMQ_CATCH_RETHROW( IOException )
-    AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException )
     AMQ_CATCHALL_THROW( IOException )
 }
 
@@ -173,7 +173,7 @@
         return wireFormat->looseUnmarshalNestedObject( dataIn );
     }
     AMQ_CATCH_RETHROW( IOException )
-    AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException )
     AMQ_CATCHALL_THROW( IOException )
 }
 
@@ -188,7 +188,7 @@
         wireFormat->looseMarshalNestedObject( object, dataOut );
     }
     AMQ_CATCH_RETHROW( IOException )
-    AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException )
     AMQ_CATCHALL_THROW( IOException )
 }
 
@@ -211,7 +211,7 @@
         }
     }
     AMQ_CATCH_RETHROW( IOException )
-    AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException )
     AMQ_CATCHALL_THROW( IOException )
 }
 
@@ -290,7 +290,7 @@
         }
     }
     AMQ_CATCH_RETHROW( IOException )
-    AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException )
     AMQ_CATCHALL_THROW( IOException )
 }
 
@@ -307,7 +307,7 @@
         }
     }
     AMQ_CATCH_RETHROW( IOException )
-    AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException )
     AMQ_CATCHALL_THROW( IOException )
 }
 
@@ -323,7 +323,7 @@
         }
     }
     AMQ_CATCH_RETHROW( IOException )
-    AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException )
     AMQ_CATCHALL_THROW( IOException )
 }
 
@@ -360,7 +360,7 @@
         }
     }
     AMQ_CATCH_RETHROW( IOException )
-    AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException )
     AMQ_CATCHALL_THROW( IOException )
 }
 
@@ -388,7 +388,7 @@
         }
     }
     AMQ_CATCH_RETHROW( IOException )
-    AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException )
     AMQ_CATCHALL_THROW( IOException )
 }
 
@@ -418,7 +418,7 @@
         }
     }
     AMQ_CATCH_RETHROW( IOException )
-    AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException )
     AMQ_CATCHALL_THROW( IOException )
 }
 
@@ -432,7 +432,7 @@
         dataOut->writeLong( value );
     }
     AMQ_CATCH_RETHROW( IOException )
-    AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException )
     AMQ_CATCHALL_THROW( IOException )
 }
 
@@ -446,7 +446,7 @@
         return dataIn->readLong();
     }
     AMQ_CATCH_RETHROW( IOException )
-    AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException )
     AMQ_CATCHALL_THROW( IOException )
 }
 
@@ -493,7 +493,7 @@
         }
     }
     AMQ_CATCH_RETHROW( IOException )
-    AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException )
     AMQ_CATCHALL_THROW( IOException )
 }
 
@@ -540,7 +540,7 @@
         }
     }
     AMQ_CATCH_RETHROW( IOException )
-    AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException )
     AMQ_CATCHALL_THROW( IOException )
 }
 
@@ -583,7 +583,7 @@
         }
     }
     AMQ_CATCH_RETHROW( IOException )
-    AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException )
     AMQ_CATCHALL_THROW( IOException )
 }
 
@@ -631,7 +631,7 @@
         }
     }
     AMQ_CATCH_RETHROW( IOException )
-    AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException )
     AMQ_CATCHALL_THROW( IOException )
 }
 
@@ -676,7 +676,7 @@
         }
     }
     AMQ_CATCH_RETHROW( IOException )
-    AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException )
     AMQ_CATCHALL_THROW( IOException )
 }
 
@@ -699,7 +699,7 @@
         return data;
     }
     AMQ_CATCH_RETHROW( IOException )
-    AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException )
     AMQ_CATCHALL_THROW( IOException )
 }
 
@@ -721,7 +721,7 @@
         return std::vector<unsigned char>();
     }
     AMQ_CATCH_RETHROW( IOException )
-    AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException )
     AMQ_CATCHALL_THROW( IOException )
 }
 
@@ -739,7 +739,7 @@
         return data;
     }
     AMQ_CATCH_RETHROW( IOException )
-    AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException )
     AMQ_CATCHALL_THROW( IOException )
 }
 
@@ -756,7 +756,7 @@
         return data;
     }
     AMQ_CATCH_RETHROW( IOException )
-    AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException )
     AMQ_CATCHALL_THROW( IOException )
 }
 
@@ -828,6 +828,6 @@
         return text;
     }
     AMQ_CATCH_RETHROW( IOException )
-    AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException )
     AMQ_CATCHALL_THROW( IOException )
 }

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/BaseDataStreamMarshaller.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/BaseDataStreamMarshaller.h?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/BaseDataStreamMarshaller.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/BaseDataStreamMarshaller.h Sun Nov 11 08:52:45 2007
@@ -34,8 +34,7 @@
      * Base class for all Marshallers that marshal DataStructures to and
      * from the wire using the OpenWire protocal.
      */
-    class BaseDataStreamMarshaller : public DataStreamMarshaller
-    {
+    class BaseDataStreamMarshaller : public DataStreamMarshaller {
     private:
 
         // Table for converting bytes to Hex Strings.
@@ -536,7 +535,7 @@
                 }
             }
             AMQ_CATCH_RETHROW( decaf::io::IOException )
-            AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException )
+            AMQ_CATCH_EXCEPTION_CONVERT( decaf::lang::Exception, decaf::io::IOException )
             AMQ_CATCHALL_THROW( decaf::io::IOException )
         }
 
@@ -569,7 +568,7 @@
                 }
             }
             AMQ_CATCH_RETHROW( decaf::io::IOException )
-            AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException )
+            AMQ_CATCH_EXCEPTION_CONVERT( decaf::lang::Exception, decaf::io::IOException )
             AMQ_CATCHALL_THROW( decaf::io::IOException )
         }
 
@@ -601,7 +600,7 @@
                 }
             }
             AMQ_CATCH_RETHROW( decaf::io::IOException )
-            AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException )
+            AMQ_CATCH_EXCEPTION_CONVERT( decaf::lang::Exception, decaf::io::IOException )
             AMQ_CATCHALL_THROW( decaf::io::IOException )
         }
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/DataStreamMarshaller.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/DataStreamMarshaller.h?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/DataStreamMarshaller.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/DataStreamMarshaller.h Sun Nov 11 08:52:45 2007
@@ -32,8 +32,7 @@
     /**
      * Base class for all classes that marshal commands for Openwire
      */
-    class DataStreamMarshaller
-    {
+    class DataStreamMarshaller {
     public:
 
         virtual ~DataStreamMarshaller() {}

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/MarshalAware.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/MarshalAware.h?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/MarshalAware.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/MarshalAware.h Sun Nov 11 08:52:45 2007
@@ -30,8 +30,7 @@
 
 namespace marshal{
 
-    class MarshalAware
-    {
+    class MarshalAware {
     public:
 
         virtual ~MarshalAware() {}

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/PrimitiveMapMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/PrimitiveMapMarshaller.cpp?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/PrimitiveMapMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/PrimitiveMapMarshaller.cpp Sun Nov 11 08:52:45 2007
@@ -33,12 +33,13 @@
 using namespace activemq::connector::openwire::marshal;
 using namespace decaf;
 using namespace decaf::io;
+using namespace decaf::lang;
 
 ///////////////////////////////////////////////////////////////////////////////
 void PrimitiveMapMarshaller::marshal( const util::PrimitiveMap* map,
                                       std::vector<unsigned char>& dest )
-                                        throw ( cms::CMSException )
-{
+                                        throw ( cms::CMSException ) {
+
     try {
 
         ByteArrayOutputStream bytesOut( dest );
@@ -61,14 +62,15 @@
         }
     }
     AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
     AMQ_CATCHALL_THROW( ActiveMQException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 PrimitiveMap* PrimitiveMapMarshaller::unmarshal(
     const std::vector<unsigned char>& src )
-        throw ( cms::CMSException )
-{
+        throw ( cms::CMSException ) {
+
     try{
 
         ByteArrayInputStream bytesIn( src );
@@ -89,8 +91,8 @@
 
         return NULL;
     }
-    AMQ_CATCH_EXCEPTION_CONVERT( io::IOException, ActiveMQException )
     AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
     AMQ_CATCHALL_THROW( ActiveMQException )
 }
 
@@ -120,8 +122,8 @@
             }
         }
     }
-    AMQ_CATCH_EXCEPTION_CONVERT( io::IOException, ActiveMQException )
     AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
     AMQ_CATCHALL_THROW( ActiveMQException )
 }
 
@@ -132,57 +134,57 @@
 
     try {
 
-        if( value.getValueType() == PrimitiveMap::BOOLEAN_TYPE )
-        {
+        if( value.getValueType() == PrimitiveMap::BOOLEAN_TYPE ) {
+
             dataOut.writeByte( PrimitiveMap::BOOLEAN_TYPE );
             dataOut.writeBoolean( value.getBool() );
-        }
-        else if( value.getValueType() == PrimitiveMap::BYTE_TYPE )
-        {
+
+        } else if( value.getValueType() == PrimitiveMap::BYTE_TYPE ) {
+
             dataOut.writeByte( PrimitiveMap::BYTE_TYPE );
             dataOut.writeByte( value.getByte() );
-        }
-        else if( value.getValueType() == PrimitiveMap::CHAR_TYPE )
-        {
+
+        } else if( value.getValueType() == PrimitiveMap::CHAR_TYPE ) {
+
             dataOut.writeByte( PrimitiveMap::CHAR_TYPE );
             dataOut.writeChar( value.getChar() );
-        }
-        else if( value.getValueType() == PrimitiveMap::SHORT_TYPE )
-        {
+
+        } else if( value.getValueType() == PrimitiveMap::SHORT_TYPE ) {
+
             dataOut.writeByte( PrimitiveMap::SHORT_TYPE );
             dataOut.writeShort( value.getShort() );
-        }
-        else if( value.getValueType() == PrimitiveMap::INTEGER_TYPE )
-        {
+
+        } else if( value.getValueType() == PrimitiveMap::INTEGER_TYPE ) {
+
             dataOut.writeByte( PrimitiveMap::INTEGER_TYPE );
             dataOut.writeInt( value.getInt() );
-        }
-        else if( value.getValueType() == PrimitiveMap::LONG_TYPE )
-        {
+
+        } else if( value.getValueType() == PrimitiveMap::LONG_TYPE ) {
+
             dataOut.writeByte( PrimitiveMap::LONG_TYPE );
             dataOut.writeLong( value.getLong() );
-        }
-        else if( value.getValueType() == PrimitiveMap::FLOAT_TYPE )
-        {
+
+        } else if( value.getValueType() == PrimitiveMap::FLOAT_TYPE ) {
+
             dataOut.writeByte( PrimitiveMap::FLOAT_TYPE );
             dataOut.writeFloat( value.getFloat() );
-        }
-        else if( value.getValueType() == PrimitiveMap::DOUBLE_TYPE )
-        {
+
+        } else if( value.getValueType() == PrimitiveMap::DOUBLE_TYPE ) {
+
             dataOut.writeByte( PrimitiveMap::DOUBLE_TYPE );
             dataOut.writeDouble( value.getDouble() );
-        }
-        else if( value.getValueType() == PrimitiveMap::BYTE_ARRAY_TYPE )
-        {
+
+        } else if( value.getValueType() == PrimitiveMap::BYTE_ARRAY_TYPE ) {
+
             dataOut.writeByte( PrimitiveMap::BYTE_ARRAY_TYPE );
 
             std::vector<unsigned char> data = value.getByteArray();
 
             dataOut.writeInt( (int)data.size() );
             dataOut.write( data );
-        }
-        else if( value.getValueType() == PrimitiveMap::STRING_TYPE )
-        {
+
+        } else if( value.getValueType() == PrimitiveMap::STRING_TYPE ) {
+
             std::string data = value.getString();
 
             // is the string big??
@@ -193,9 +195,8 @@
             }
 
             OpenwireStringSupport::writeString( dataOut, &data );
-        }
-        else
-        {
+
+        } else {
             throw IOException(
                 __FILE__,
                 __LINE__,
@@ -203,7 +204,7 @@
         }
     }
     AMQ_CATCH_RETHROW( io::IOException )
-    AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, io::IOException )
     AMQ_CATCHALL_THROW( io::IOException )
 }
 
@@ -270,6 +271,6 @@
         }
     }
     AMQ_CATCH_RETHROW( io::IOException )
-    AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, io::IOException )
     AMQ_CATCHALL_THROW( io::IOException )
 }

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/PrimitiveMapMarshaller.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/PrimitiveMapMarshaller.h?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/PrimitiveMapMarshaller.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/PrimitiveMapMarshaller.h Sun Nov 11 08:52:45 2007
@@ -34,8 +34,7 @@
      * map to the Openwire Format's expectation of what the map looks like
      * on the wire.
      */
-    class PrimitiveMapMarshaller
-    {
+    class PrimitiveMapMarshaller {
     public:
 
         PrimitiveMapMarshaller() {}
@@ -48,7 +47,8 @@
          * @throws CMSException
          */
         static void marshal( const util::PrimitiveMap* map,
-                             std::vector<unsigned char>& dest ) throw ( cms::CMSException );
+                             std::vector<unsigned char>& dest )
+                                throw ( cms::CMSException );
 
         /**
          * Static Map Unmarshaler, takes an array of bytes and returns a
@@ -66,7 +66,8 @@
          * @param reference to a byte array to read data from.
          */
         static void unmarshal( util::PrimitiveMap* map,
-                               const std::vector<unsigned char>& src ) throw ( cms::CMSException );
+                               const std::vector<unsigned char>& src )
+                                    throw ( cms::CMSException );
 
     protected:
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/utils/BooleanStream.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/utils/BooleanStream.cpp?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/utils/BooleanStream.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/utils/BooleanStream.cpp Sun Nov 11 08:52:45 2007
@@ -30,8 +30,8 @@
 using namespace decaf::lang::exceptions;
 
 ///////////////////////////////////////////////////////////////////////////////
-BooleanStream::BooleanStream()
-{
+BooleanStream::BooleanStream() {
+
     this->arrayLimit = 0;
     this->arrayPos = 0;
     this->bytePos = 0;
@@ -41,13 +41,10 @@
 }
 
 ///////////////////////////////////////////////////////////////////////////////
-BooleanStream::~BooleanStream()
-{}
-
-///////////////////////////////////////////////////////////////////////////////
 bool BooleanStream::readBoolean() throw ( IOException ) {
 
     try {
+    	
         unsigned char b = data[arrayPos];
         bool rc = ( ( b >> bytePos ) & 0x01 ) != 0;
         bytePos++;
@@ -58,7 +55,7 @@
         return rc;
     }
     AMQ_CATCH_RETHROW( IOException )
-    AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException )
     AMQ_CATCHALL_THROW( IOException )
 }
 
@@ -89,7 +86,7 @@
         }
     }
     AMQ_CATCH_RETHROW( IOException )
-    AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException )
     AMQ_CATCHALL_THROW( IOException )
 }
 
@@ -113,7 +110,7 @@
         clear();
     }
     AMQ_CATCH_RETHROW( IOException )
-    AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException )
     AMQ_CATCHALL_THROW( IOException )
 }
 
@@ -121,6 +118,7 @@
 void BooleanStream::marshal( std::vector< unsigned char >& dataOut ) {
 
     try{
+
         if( arrayLimit < 64 ) {
             dataOut.push_back( ( unsigned char ) arrayLimit );
         } else if( arrayLimit < 256 ) { // max value of unsigned byte
@@ -137,7 +135,7 @@
         std::copy( &data[0], &data[arrayLimit-1], iter );
     }
     AMQ_CATCH_RETHROW( IOException )
-    AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException )
     AMQ_CATCHALL_THROW( IOException )
 }
 
@@ -163,18 +161,20 @@
         clear();
     }
     AMQ_CATCH_RETHROW( IOException )
-    AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException )
     AMQ_CATCHALL_THROW( IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void BooleanStream::clear() {
+    // Reset the positions
     arrayPos = 0;
     bytePos = 0;
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 int BooleanStream::marshalledSize() {
+
     if( arrayLimit < 64 ) {
         return 1 + arrayLimit;
     } else if( arrayLimit < 256 ) {

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/utils/BooleanStream.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/utils/BooleanStream.h?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/utils/BooleanStream.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/utils/BooleanStream.h Sun Nov 11 08:52:45 2007
@@ -45,12 +45,11 @@
      * value.  If the first byte = 0xC0, the following unsigned byte is the size field.
      * If the first byte = 0x80, the following short (two bytes) are the size field.
      */
-    class BooleanStream
-    {
+    class BooleanStream {
     public:
 
         BooleanStream();
-        virtual ~BooleanStream();
+        virtual ~BooleanStream() {}
 
         /**
          * Read a boolean data element from the internal data buffer

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/utils/HexTable.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/utils/HexTable.cpp?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/utils/HexTable.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/utils/HexTable.cpp Sun Nov 11 08:52:45 2007
@@ -49,26 +49,39 @@
 ////////////////////////////////////////////////////////////////////////////////
 const std::string& HexTable::operator[]( std::size_t index )
     throw ( IndexOutOfBoundsException ) {
-    if( size() < index ) {
-        throw IndexOutOfBoundsException(
-            __FILE__, __LINE__,
-            ( string( "HexTable::operator[] - Index passed is out of Bounds" ) +
-              Integer::toString( (int)index ) ).c_str() );
-    }
 
-    return table[index];
+    try{
+
+        if( size() < index ) {
+            throw IndexOutOfBoundsException(
+                __FILE__, __LINE__,
+                ( string( "HexTable::operator[] - Index passed is out of Bounds" ) +
+                  Integer::toString( (int)index ) ).c_str() );
+        }
+
+        return table[index];
+    }
+    AMQ_CATCH_RETHROW( IndexOutOfBoundsException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IndexOutOfBoundsException )
+    AMQ_CATCHALL_THROW( IndexOutOfBoundsException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 const std::string& HexTable::operator[]( std::size_t index ) const
     throw ( IndexOutOfBoundsException ) {
 
-    if( size() < index ) {
-        throw IndexOutOfBoundsException(
-            __FILE__, __LINE__,
-            ( string( "HexTable::operator[] - Index passed is out of Bounds" ) +
-              Integer::toString( (int)index ) ).c_str() );
-    }
+    try{
+
+        if( size() < index ) {
+            throw IndexOutOfBoundsException(
+                __FILE__, __LINE__,
+                ( string( "HexTable::operator[] - Index passed is out of Bounds" ) +
+                  Integer::toString( (int)index ) ).c_str() );
+        }
 
-    return table[index];
+        return table[index];
+    }
+    AMQ_CATCH_RETHROW( IndexOutOfBoundsException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IndexOutOfBoundsException )
+    AMQ_CATCHALL_THROW( IndexOutOfBoundsException )
 }

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/utils/HexTable.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/utils/HexTable.h?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/utils/HexTable.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/utils/HexTable.h Sun Nov 11 08:52:45 2007
@@ -33,8 +33,7 @@
      * into the table, i.e. the class will return "FF" for the index 255 in
      * the table.
      */
-    class HexTable
-    {
+    class HexTable {
     public:
 
         HexTable();

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/utils/OpenwireStringSupport.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/utils/OpenwireStringSupport.cpp?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/utils/OpenwireStringSupport.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/utils/OpenwireStringSupport.cpp Sun Nov 11 08:52:45 2007
@@ -86,7 +86,7 @@
         return "";
     }
     AMQ_CATCH_RETHROW( decaf::io::IOException )
-    AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, decaf::io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, decaf::io::IOException )
     AMQ_CATCHALL_THROW( decaf::io::IOException )
 }
 
@@ -97,8 +97,8 @@
 
     try {
 
-        if( str != NULL )
-        {
+        if( str != NULL ) {
+
             if( str->size() > 65536 ) {
                 throw IOException(
                     __FILE__,
@@ -152,6 +152,6 @@
         }
     }
     AMQ_CATCH_RETHROW( decaf::io::IOException )
-    AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, decaf::io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, decaf::io::IOException )
     AMQ_CATCHALL_THROW( decaf::io::IOException )
 }

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/utils/OpenwireStringSupport.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/utils/OpenwireStringSupport.h?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/utils/OpenwireStringSupport.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/utils/OpenwireStringSupport.h Sun Nov 11 08:52:45 2007
@@ -27,8 +27,7 @@
 namespace openwire{
 namespace utils{
 
-    class OpenwireStringSupport
-    {
+    class OpenwireStringSupport {
     protected:
 
         OpenwireStringSupport() {}

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompCommandListener.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompCommandListener.h?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompCommandListener.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompCommandListener.h Sun Nov 11 08:52:45 2007
@@ -29,18 +29,17 @@
      * Interface class for object that with to register with the Stomp
      * Connector in order to process a Command that was received.
      */
-    class StompCommandListener
-    {
+    class StompCommandListener {
     public:
-    
+
         virtual ~StompCommandListener(void) {}
-    
+
         /**
          * Process the Stomp Command
          * @param command to process
          * @throw ConnterException
          */
-        virtual void onStompCommand( commands::StompCommand* command ) 
+        virtual void onStompCommand( commands::StompCommand* command )
             throw ( StompConnectorException ) = 0;
 
     };

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompCommandReader.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompCommandReader.cpp?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompCommandReader.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompCommandReader.cpp Sun Nov 11 08:52:45 2007
@@ -32,24 +32,22 @@
 using namespace decaf::util::concurrent;
 
 ////////////////////////////////////////////////////////////////////////////////
-StompCommandReader::StompCommandReader(void)
-{
+StompCommandReader::StompCommandReader() {
     inputStream = NULL;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-StompCommandReader::StompCommandReader( InputStream* is )
-{
+StompCommandReader::StompCommandReader( InputStream* is ) {
     inputStream = is;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-Command* StompCommandReader::readCommand()
-    throw ( CommandIOException )
-{
+Command* StompCommandReader::readCommand() throw ( CommandIOException ) {
+
     StompFrame* frame = NULL;
-    try
-    {
+
+    try{
+
         // Create a new Frame for reading to.
         frame = new StompFrame();
 
@@ -64,22 +62,25 @@
 
         // Return the Command, caller must delete it.
         return marshaler.marshal( frame );
-    }
-    catch( CommandIOException& ex ){
+
+    } catch( CommandIOException& ex ){
+
         if( frame != NULL ){
             delete frame;
         }
         ex.setMark( __FILE__, __LINE__);
         throw ex;
-    }
-    catch( ActiveMQException& ex ){
+
+    } catch( ActiveMQException& ex ){
+
         if( frame != NULL ){
             delete frame;
         }
         ex.setMark( __FILE__, __LINE__ );
         throw CommandIOException(ex);
-    }
-    catch( ... ){
+
+    } catch( ... ) {
+
         if( frame != NULL ){
             delete frame;
         }
@@ -89,19 +90,20 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 void StompCommandReader::readStompCommandHeader( StompFrame& frame )
-   throw ( CommandIOException )
-{
+   throw ( CommandIOException ) {
+
     try{
-        while( true )
-        {
+
+        while( true ) {
+
             // The command header is formatted
             // just like any other stomp header.
             readStompHeaderLine();
 
             // Ignore all white space before the command.
             long long offset = -1;
-            for( size_t ix = 0; ix < buffer.size()-1; ++ix )
-            {
+            for( size_t ix = 0; ix < buffer.size()-1; ++ix ) {
+
                 // Find the first non whitespace character
                 if( !Character::isWhitespace(buffer[ix]) ){
                     offset = (long long)ix;
@@ -109,8 +111,7 @@
                 }
             }
 
-            if( offset >= 0 )
-            {
+            if( offset >= 0 ) {
                 // Set the command in the frame - copy the memory.
                 frame.setCommand( reinterpret_cast<char*>(&buffer[(size_t)offset]) );
                 break;
@@ -125,39 +126,40 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 void StompCommandReader::readStompHeaders( StompFrame& frame )
-   throw ( CommandIOException )
-{
+    throw ( CommandIOException ) {
+
     try{
+
         // Read the command;
         bool endOfHeaders = false;
 
-        while( !endOfHeaders )
-        {
+        while( !endOfHeaders ) {
+
             // Read in the next header line.
             std::size_t numChars = readStompHeaderLine();
 
-            if( numChars == 0 )
-            {
+            if( numChars == 0 ) {
+
                 // should never get here
-                throw StompConnectorException(
+                throw CommandIOException(
                     __FILE__, __LINE__,
                     "StompCommandReader::readStompHeaders: no characters read" );
             }
 
             // Check for an empty line to demark the end of the header section.
             // if its not the end then we have a header to process, so parse it.
-            if( numChars == 1 && buffer[0] == '\0' )
-            {
+            if( numChars == 1 && buffer[0] == '\0' ) {
+
                 endOfHeaders = true;
-            }
-            else
-            {
+
+            } else {
+
                 // Search through this line to separate the key/value pair.
-                for( size_t ix = 0; ix < buffer.size(); ++ix )
-                {
+                for( size_t ix = 0; ix < buffer.size(); ++ix ) {
+
                     // If found the key/value separator...
-                    if( buffer[ix] == ':' )
-                    {
+                    if( buffer[ix] == ':' ) {
+
                         // Null-terminate the key.
                         buffer[ix] = '\0';
 
@@ -181,16 +183,17 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 std::size_t StompCommandReader::readStompHeaderLine()
-    throw ( CommandIOException )
-{
+    throw ( CommandIOException ) {
+
     try{
+
         // Clear any data from the buffer.
         buffer.clear();
 
         std::size_t count = 0;
 
-        while( true )
-        {
+        while( true ) {
+
             // Read the next char from the stream.
             buffer.push_back( inputStream->read() );
 
@@ -209,7 +212,7 @@
         }
 
         // If we get here something bad must have happened.
-        throw StompConnectorException(
+        throw CommandIOException(
             __FILE__, __LINE__,
             "StompCommandReader::readStompHeaderLine: "
             "Unrecoverable, error condition");
@@ -220,9 +223,10 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 void StompCommandReader::readStompBody( StompFrame& frame )
-   throw ( CommandIOException )
-{
+   throw ( CommandIOException ) {
+
     try{
+
         // Clear any data from the buffer.
         buffer.clear();
 
@@ -230,8 +234,8 @@
 
         if(frame.getProperties().hasProperty(
             commands::CommandConstants::toString(
-                commands::CommandConstants::HEADER_CONTENTLENGTH)))
-        {
+                commands::CommandConstants::HEADER_CONTENTLENGTH))) {
+
             char* stopped_string = NULL;
 
             string length =
@@ -245,8 +249,7 @@
                 10 );
          }
 
-         if( content_length != 0 )
-         {
+         if( content_length != 0 ) {
             // For this case its assumed that content length indicates how
             // much to read.  We reserve space in the buffer for it to
             // minimize the number of reallocs that might occur.  We are
@@ -269,21 +272,20 @@
             read( &buffer[0], content_length );
 
             // Content Length read, now pop the end terminator off (\0\n).
-            if(inputStream->read() != '\0' )
-            {
-                throw StompConnectorException(
+            if(inputStream->read() != '\0' ) {
+
+                throw CommandIOException(
                     __FILE__, __LINE__,
                     "StompCommandReader::readStompBody: "
                     "Read Content Length, and no trailing null");
             }
-        }
-        else
-        {
+
+        } else {
+
             // Content length was either zero, or not set, so we read until the
             // first null is encounted.
+            while( true ) {
 
-            while( true )
-            {
                 char byte = inputStream->read();
 
                 buffer.push_back(byte);
@@ -299,8 +301,7 @@
             }
         }
 
-        if( content_length != 0 )
-        {
+        if( content_length != 0 ) {
             // Set the body contents in the frame - copy the memory
             frame.getBody() = buffer;
         }
@@ -311,11 +312,11 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 std::size_t StompCommandReader::read( unsigned char* buffer, std::size_t count )
-   throw( decaf::io::IOException )
-{
+   throw( decaf::io::IOException ) {
+
     try{
-        if( inputStream == NULL )
-        {
+
+        if( inputStream == NULL ) {
             throw IOException(
                 __FILE__, __LINE__,
                 "StompCommandReader::read(char*,int) - input stream is NULL" );
@@ -329,11 +330,11 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-unsigned char StompCommandReader::readByte() throw( decaf::io::IOException )
-{
-        try{
-        if( inputStream == NULL )
-        {
+unsigned char StompCommandReader::readByte() throw( decaf::io::IOException ) {
+
+    try{
+
+        if( inputStream == NULL ) {
             throw IOException(
                 __FILE__, __LINE__,
                 "StompCommandReader::read(char*,int) - input stream is NULL" );

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompCommandReader.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompCommandReader.h?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompCommandReader.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompCommandReader.h Sun Nov 11 08:52:45 2007
@@ -18,12 +18,12 @@
 #define _ACTIVEMQ_CONNECTOR_STOMP_STOMPCOMMANDREADER_H_
 
 #include <activemq/transport/CommandReader.h>
-#include <decaf/io/InputStream.h>
 #include <activemq/transport/CommandIOException.h>
 #include <activemq/transport/Command.h>
 #include <activemq/connector/stomp/StompFrame.h>
 #include <activemq/connector/stomp/StompConnectorException.h>
 #include <activemq/connector/stomp/marshal/Marshaler.h>
+#include <decaf/io/InputStream.h>
 
 namespace activemq{
 namespace connector{

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompCommandWriter.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompCommandWriter.cpp?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompCommandWriter.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompCommandWriter.cpp Sun Nov 11 08:52:45 2007
@@ -29,25 +29,22 @@
 using namespace activemq::exceptions;
 
 ////////////////////////////////////////////////////////////////////////////////
-StompCommandWriter::StompCommandWriter()
-{
+StompCommandWriter::StompCommandWriter() {
     outputStream = NULL;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-StompCommandWriter::StompCommandWriter( OutputStream* os )
-{
+StompCommandWriter::StompCommandWriter( OutputStream* os ) {
     outputStream = os;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 void StompCommandWriter::writeCommand( Command* command )
-    throw ( transport::CommandIOException )
-{
-    try
-    {
-        if( outputStream == NULL )
-        {
+    throw ( transport::CommandIOException ) {
+
+    try{
+
+        if( outputStream == NULL ) {
             throw CommandIOException(
                 __FILE__, __LINE__,
                 "StompCommandWriter::writeCommand - "
@@ -63,8 +60,7 @@
 
         // Write all the headers.
         vector< pair<string,string> > headers = frame.getProperties().toArray();
-        for( std::size_t ix=0; ix < headers.size(); ++ix )
-        {
+        for( std::size_t ix=0; ix < headers.size(); ++ix ) {
             string& name = headers[ix].first;
             string& value = headers[ix].second;
 
@@ -79,16 +75,15 @@
 
         // Write the body.
         const std::vector<unsigned char>& body = frame.getBody();
-        if( body.size() > 0 )
-        {
+        if( body.size() > 0 ) {
             write( &body[0], body.size() );
         }
 
         if( ( frame.getBodyLength() == 0 ) ||
             ( frame.getProperties().getProperty(
                   CommandConstants::toString(
-                      CommandConstants::HEADER_CONTENTLENGTH ), "" ) != "" ) )
-        {
+                      CommandConstants::HEADER_CONTENTLENGTH ), "" ) != "" ) ) {
+
             writeByte( '\0' );
         }
 
@@ -104,34 +99,53 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 void StompCommandWriter::write( const unsigned char* buffer, std::size_t count )
-    throw( IOException )
-{
-    if( outputStream == NULL )
-    {
+    throw( IOException ) {
+
+    if( outputStream == NULL ) {
         throw IOException(
-            __FILE__, __LINE__,
-            "StompCommandWriter::write(char*,int) - input stream is NULL" );
+        __FILE__, __LINE__,
+        "StompCommandWriter::write(char*,int) - output stream is NULL" );
     }
 
-    outputStream->write( buffer, 0, count );
+    try {
+        outputStream->write( buffer, 0, count );
+    }
+    AMQ_CATCH_RETHROW( IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, IOException )
+    AMQ_CATCHALL_THROW( IOException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void StompCommandWriter::writeByte( unsigned char v ) throw( IOException )
-{
-    if( outputStream == NULL )
-    {
+void StompCommandWriter::writeByte( unsigned char v ) throw( IOException ) {
+
+    if( outputStream == NULL ) {
         throw IOException(
-            __FILE__, __LINE__,
-            "StompCommandWriter::write(char) - input stream is NULL" );
+        __FILE__, __LINE__,
+        "StompCommandWriter::writeByte( char ) - output stream is NULL" );
     }
 
-    outputStream->write( v );
+    try {
+        outputStream->write( v );
+    }
+    AMQ_CATCH_RETHROW( IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, IOException )
+    AMQ_CATCHALL_THROW( IOException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 void StompCommandWriter::write( const char* buffer, std::size_t count )
    throw( decaf::io::IOException )
 {
-    write( reinterpret_cast<const unsigned char*>( buffer ), count );
+    if( outputStream == NULL ) {
+        throw IOException(
+        __FILE__, __LINE__,
+        "StompCommandWriter::write() - output stream is NULL" );
+    }
+
+    try {
+        write( reinterpret_cast<const unsigned char*>( buffer ), count );
+    }
+    AMQ_CATCH_RETHROW( IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, IOException )
+    AMQ_CATCHALL_THROW( IOException )
 }

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompCommandWriter.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompCommandWriter.h?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompCommandWriter.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompCommandWriter.h Sun Nov 11 08:52:45 2007
@@ -18,12 +18,12 @@
 #define _ACTIVEMQ_CONNECTOR_STOMP_STOMPCOMMANDWRITER_H_
 
 #include <activemq/transport/CommandWriter.h>
-#include <decaf/io/InputStream.h>
 #include <activemq/transport/CommandIOException.h>
 #include <activemq/connector/stomp/StompConnectorException.h>
+#include <activemq/connector/stomp/marshal/Marshaler.h>
 #include <activemq/transport/Command.h>
 #include <decaf/io/OutputStream.h>
-#include <activemq/connector/stomp/marshal/Marshaler.h>
+#include <decaf/io/InputStream.h>
 
 namespace activemq{
 namespace connector{

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompConnectionNegotiator.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompConnectionNegotiator.cpp?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompConnectionNegotiator.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompConnectionNegotiator.cpp Sun Nov 11 08:52:45 2007
@@ -28,28 +28,35 @@
 using namespace activemq::connector;
 using namespace activemq::connector::stomp;
 using namespace activemq::connector::stomp::commands;
+using namespace decaf::lang;
+using namespace decaf::lang::exceptions;
+using namespace decaf::util;
 using namespace decaf::util::concurrent;
 
 ////////////////////////////////////////////////////////////////////////////////
 StompConnectionNegotiator::StompConnectionNegotiator( Transport* next, bool own ) :
     TransportFilter( next, own ),
-    readyCountDownLatch(1)
-{
+    readyCountDownLatch(1) {
+
     this->connected = false;
     this->closed = true;
     this->connectedCmd = NULL;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-StompConnectionNegotiator::~StompConnectionNegotiator()
-{
-    // Close the transport and destroy it.
-    close();
+StompConnectionNegotiator::~StompConnectionNegotiator() {
+
+    try{
+        // Close the transport and destroy it.
+        close();
+    }
+    AMQ_CATCHALL_NOTHROW()
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 void StompConnectionNegotiator::oneway( Command* command )
-    throw( CommandIOException, decaf::lang::exceptions::UnsupportedOperationException ) {
+    throw( CommandIOException,
+           decaf::lang::exceptions::UnsupportedOperationException ) {
 
     try{
 
@@ -61,9 +68,10 @@
 
         next->oneway( command );
     }
-    AMQ_CATCH_RETHROW( decaf::lang::exceptions::UnsupportedOperationException )
+    AMQ_CATCH_RETHROW( UnsupportedOperationException )
     AMQ_CATCH_RETHROW( CommandIOException )
-    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, CommandIOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, CommandIOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, CommandIOException )
     AMQ_CATCHALL_THROW( CommandIOException )
 }
 
@@ -111,9 +119,10 @@
             return connectedCmd;
         }
     }
-    AMQ_CATCH_RETHROW( decaf::lang::exceptions::UnsupportedOperationException )
+    AMQ_CATCH_RETHROW( UnsupportedOperationException )
     AMQ_CATCH_RETHROW( CommandIOException )
-    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, CommandIOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, CommandIOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, CommandIOException )
     AMQ_CATCHALL_THROW( CommandIOException )
 }
 
@@ -143,7 +152,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 void StompConnectionNegotiator::onTransportException(
     Transport* source AMQCPP_UNUSED,
-    const exceptions::ActiveMQException& ex ) {
+    const decaf::lang::Exception& ex ) {
 
     readyCountDownLatch.countDown();
     fire( ex );
@@ -180,21 +189,33 @@
             "next transport is NULL" );
     }
 
-    // Start the delegate transport object.
-    next->start();
+    try{
+
+        // Start the delegate transport object.
+        next->start();
 
-    // Mark it as open.
-    closed = false;
-    connected = false;
+        // Mark it as open.
+        closed = false;
+        connected = false;
+    }
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 void StompConnectionNegotiator::close() throw( cms::CMSException ){
 
-    if( !closed && next != NULL ){
-        next->close();
-    }
+    try{
 
-    closed = true;
-    connected = false;
+        if( !closed && next != NULL ){
+            next->close();
+        }
+
+        closed = true;
+        connected = false;
+    }
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
 }

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompConnectionNegotiator.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompConnectionNegotiator.h?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompConnectionNegotiator.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompConnectionNegotiator.h Sun Nov 11 08:52:45 2007
@@ -144,7 +144,7 @@
          * @param own - do we own the Transport pointer.
          */
         StompConnectionNegotiator( transport::Transport* next,
-                                  bool own = true );
+                                   bool own = true );
 
         virtual ~StompConnectionNegotiator();
 
@@ -160,7 +160,8 @@
          * by this transport.
          */
         virtual void oneway( transport::Command* command )
-            throw( transport::CommandIOException, decaf::lang::exceptions::UnsupportedOperationException );
+            throw( transport::CommandIOException,
+                   decaf::lang::exceptions::UnsupportedOperationException );
 
         /**
          * Sends the given request to the server and waits for the response.
@@ -171,7 +172,8 @@
          * @throws CommandIOException if an error occurs with the request.
          */
         virtual transport::Response* request( transport::Command* command )
-            throw( transport::CommandIOException, decaf::lang::exceptions::UnsupportedOperationException );
+            throw( transport::CommandIOException,
+                   decaf::lang::exceptions::UnsupportedOperationException );
 
         /**
          * This is called in the context of the nested transport's
@@ -190,7 +192,7 @@
          */
         virtual void onTransportException(
             transport::Transport* source,
-            const exceptions::ActiveMQException& ex );
+            const decaf::lang::Exception& ex );
 
         /**
          * Starts this transport object and creates the thread for



Mime
View raw message