activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r593929 [2/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/OpenWireConnectorFactory.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireConnectorFactory.cpp?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireConnectorFactory.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireConnectorFactory.cpp Sun Nov 11 08:52:45 2007
@@ -27,17 +27,16 @@
 using namespace activemq::connector::openwire;
 
 ////////////////////////////////////////////////////////////////////////////////
-Connector* OpenWireConnectorFactory::createConnector(
+OpenWireConnector* OpenWireConnectorFactory::createConnector(
     const decaf::util::Properties& properties,
-    activemq::transport::Transport* transport )
-{
-    return dynamic_cast<Connector*>(
-        new OpenWireConnector( transport, properties ) );
+    activemq::transport::Transport* transport ) {
+
+    return new OpenWireConnector( transport, properties );
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-ConnectorFactory& OpenWireConnectorFactory::getInstance()
-{
+ConnectorFactory& OpenWireConnectorFactory::getInstance() {
+
     // Create a static instance of the registrar and return a reference to
     // its internal instance of this class.
     static ConnectorFactoryMapRegistrar registrar(

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireConnectorFactory.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireConnectorFactory.h?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireConnectorFactory.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireConnectorFactory.h Sun Nov 11 08:52:45 2007
@@ -20,13 +20,13 @@
 
 #include <activemq/connector/ConnectorFactory.h>
 #include <activemq/connector/ConnectorFactoryMapRegistrar.h>
+#include <activemq/connector/openwire/OpenWireConnector.h>
 
 namespace activemq{
 namespace connector{
 namespace openwire{
 
-    class OpenWireConnectorFactory : public connector::ConnectorFactory
-    {
+    class OpenWireConnectorFactory : public connector::ConnectorFactory {
     public:
 
         virtual ~OpenWireConnectorFactory() {}
@@ -37,7 +37,7 @@
          * configured with
          * @param transport the Transport instance this connector uses.
          */
-        virtual Connector* createConnector(
+        virtual OpenWireConnector* createConnector(
             const decaf::util::Properties& properties,
             activemq::transport::Transport* transport );
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireConsumerInfo.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireConsumerInfo.h?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireConsumerInfo.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireConsumerInfo.h Sun Nov 11 08:52:45 2007
@@ -27,7 +27,6 @@
 namespace openwire{
 
     class OpenWireConsumerInfo : public ConsumerInfo {
-
     private:
 
         // OpenWire's Consumer Info Command
@@ -48,7 +47,7 @@
             this->started = false;
         }
 
-        virtual ~OpenWireConsumerInfo() { 
+        virtual ~OpenWireConsumerInfo() {
             this->close();
             delete consumerInfo;
         }
@@ -57,7 +56,7 @@
          * Gets this message consumer's message selector expression.
          * @return This Consumer's selector expression or "".
          */
-        virtual const std::string& getMessageSelector(void) const {
+        virtual const std::string& getMessageSelector() const {
             static std::string selector = "";
 
             if( consumerInfo != NULL ) {
@@ -81,7 +80,7 @@
          * Gets the ID that is assigned to this consumer
          * @return value of the Consumer Id.
          */
-        virtual long long getConsumerId(void) const {
+        virtual long long getConsumerId() const {
             if( consumerInfo != NULL ) {
                 return (unsigned int)
                     this->consumerInfo->getConsumerId()->getValue();
@@ -104,7 +103,7 @@
          * Gets the Destination that this Consumer is subscribed on
          * @return Destination this consumer is attached to
          */
-        virtual const cms::Destination* getDestination(void) const {
+        virtual const cms::Destination* getDestination() const {
             if( this->consumerInfo != NULL ) {
                 return this->consumerInfo->getDestination()->getCMSDestination();
             }
@@ -118,7 +117,6 @@
          */
         virtual void setDestination( const cms::Destination* destination ) {
             if( consumerInfo != NULL ) {
-
                 this->consumerInfo->setDestination(
                     dynamic_cast<commands::ActiveMQDestination*>(
                         destination->clone() ) );
@@ -129,7 +127,7 @@
          * Gets the Session Info that this consumer is attached too
          * @return SessionnInfo pointer
          */
-        virtual const SessionInfo* getSessionInfo(void) const {
+        virtual const SessionInfo* getSessionInfo() const {
             return session;
         }
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireFormat.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireFormat.cpp?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireFormat.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireFormat.cpp Sun Nov 11 08:52:45 2007
@@ -77,8 +77,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-OpenWireFormat::~OpenWireFormat()
-{
+OpenWireFormat::~OpenWireFormat() {
     try {
         this->destroyMarshalers();
         delete preferedWireFormatInfo;
@@ -102,32 +101,35 @@
 ////////////////////////////////////////////////////////////////////////////////
 void OpenWireFormat::setVersion( int version ) throw ( IllegalArgumentException ) {
 
-    if( version == this->getVersion() ){
-        return;
-    }
+    try{
+        if( version == this->getVersion() ){
+            return;
+        }
 
-    // Clear old marshalers in preperation for the new set.
-    this->destroyMarshalers();
-    this->version = version;
+        // Clear old marshalers in preperation for the new set.
+        this->destroyMarshalers();
+        this->version = version;
 
-    switch( this->version ){
-    case 1:
-        v1::MarshallerFactory().configure( this );
-        break;
-    case 2:
-        v2::MarshallerFactory().configure( this );
-        break;
-    default:
-        throw IllegalArgumentException(
-            __FILE__, __LINE__,
-            "OpenWireFormat::setVersion - "
-            "Given Version: %d , is not supported", version );
+        switch( this->version ){
+        case 1:
+            v1::MarshallerFactory().configure( this );
+            break;
+        case 2:
+            v2::MarshallerFactory().configure( this );
+            break;
+        default:
+            throw IllegalArgumentException(
+                __FILE__, __LINE__,
+                "OpenWireFormat::setVersion - "
+                "Given Version: %d , is not supported", version );
+        }
     }
+    AMQ_CATCH_RETHROW( IllegalArgumentException )
+    AMQ_CATCHALL_THROW( IllegalArgumentException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void OpenWireFormat::addMarshaller( DataStreamMarshaller* marshaller )
-{
+void OpenWireFormat::addMarshaller( DataStreamMarshaller* marshaller ) {
     unsigned char type = marshaller->getDataStructureType();
     dataMarshallers[type & 0xFF] = marshaller;
 }
@@ -207,6 +209,7 @@
     }
     AMQ_CATCH_RETHROW( IOException )
     AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException )
     AMQ_CATCHALL_THROW( IOException )
 }
 
@@ -249,6 +252,7 @@
     }
     AMQ_CATCH_RETHROW( IOException )
     AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException )
     AMQ_CATCHALL_THROW( IOException )
 }
 
@@ -292,6 +296,7 @@
     }
     AMQ_CATCH_RETHROW( IOException )
     AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException )
     AMQ_CATCHALL_THROW( IOException )
 }
 
@@ -337,6 +342,7 @@
     }
     AMQ_CATCH_RETHROW( IOException )
     AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException )
     AMQ_CATCHALL_THROW( IOException )
 }
 
@@ -378,6 +384,7 @@
     }
     AMQ_CATCH_RETHROW( IOException )
     AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException )
     AMQ_CATCHALL_THROW( IOException )
 }
 
@@ -423,6 +430,7 @@
     }
     AMQ_CATCH_RETHROW( IOException )
     AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException )
     AMQ_CATCHALL_THROW( IOException )
 }
 
@@ -456,6 +464,7 @@
     }
     AMQ_CATCH_RETHROW( IOException )
     AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException )
     AMQ_CATCHALL_THROW( IOException )
 }
 
@@ -487,6 +496,7 @@
     }
     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/OpenWireFormat.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireFormat.h?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireFormat.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireFormat.h Sun Nov 11 08:52:45 2007
@@ -66,7 +66,8 @@
          * @returns the newly marshaled Command, caller owns the pointer
          * @throws IOException
          */
-        virtual transport::Command* unmarshal( decaf::io::DataInputStream* dis ) throw ( decaf::io::IOException );
+        virtual transport::Command* unmarshal( decaf::io::DataInputStream* dis )
+            throw ( decaf::io::IOException );
 
         /**
          * Utility method for Tight Marshalling the given object to the boolean
@@ -90,7 +91,8 @@
          */
         void tightMarshalNestedObject2( commands::DataStructure* o,
                                         decaf::io::DataOutputStream* ds,
-                                        utils::BooleanStream* bs ) throw ( decaf::io::IOException );
+                                        utils::BooleanStream* bs )
+            throw ( decaf::io::IOException );
 
         /**
          * Utility method used to Unmarshal a Nested DataStructure type object

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireFormatFactory.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireFormatFactory.cpp?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireFormatFactory.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireFormatFactory.cpp Sun Nov 11 08:52:45 2007
@@ -31,41 +31,46 @@
 using namespace activemq::connector::openwire;
 using namespace activemq::connector::openwire::commands;
 using namespace decaf::lang;
+using namespace decaf::lang::exceptions;
 
 ////////////////////////////////////////////////////////////////////////////////
 WireFormat* OpenWireFormatFactory::createWireFormat(
     const decaf::util::Properties& properties )
         throw ( decaf::lang::exceptions::IllegalStateException ) {
 
-    WireFormatInfo* info = new WireFormatInfo();
+    try{
 
-    // Configure the version to use
-    info->setVersion( Integer::parseInt(
-            properties.getProperty( "wireFormat.version", "2" ) ) );
-
-    // parse params out of the properties
-    info->setStackTraceEnabled( Boolean::parseBoolean(
-        properties.getProperty( "wireFormat.stackTraceEnabled",
-                                "false" ) ) );
-    info->setCacheEnabled( Boolean::parseBoolean(
-        properties.getProperty( "wireFormat.cacheEnabled",
-                                "false" ) ) );
-    info->setTcpNoDelayEnabled( Boolean::parseBoolean(
-        properties.getProperty( "wireFormat.tcpNoDelayEnabled",
-                                "false" ) ) );
-    info->setTightEncodingEnabled( Boolean::parseBoolean(
-        properties.getProperty( "wireFormat.tightEncodingEnabled",
-                                "false" ) ) );
-    info->setSizePrefixDisabled( Boolean::parseBoolean(
-        properties.getProperty( "wireFormat.sizePrefixDisabled",
-                                "false" ) ) );
+        WireFormatInfo* info = new WireFormatInfo();
 
-    // Create the Openwire Format Object
-    OpenWireFormat* f = new OpenWireFormat( properties );
-
-    // give the format object the ownership
-    f->setPreferedWireFormatInfo( info );
-
-    return f;
+        // Configure the version to use
+        info->setVersion( Integer::parseInt(
+                properties.getProperty( "wireFormat.version", "2" ) ) );
+
+        // parse params out of the properties
+        info->setStackTraceEnabled( Boolean::parseBoolean(
+            properties.getProperty( "wireFormat.stackTraceEnabled",
+                                    "false" ) ) );
+        info->setCacheEnabled( Boolean::parseBoolean(
+            properties.getProperty( "wireFormat.cacheEnabled",
+                                    "false" ) ) );
+        info->setTcpNoDelayEnabled( Boolean::parseBoolean(
+            properties.getProperty( "wireFormat.tcpNoDelayEnabled",
+                                    "false" ) ) );
+        info->setTightEncodingEnabled( Boolean::parseBoolean(
+            properties.getProperty( "wireFormat.tightEncodingEnabled",
+                                    "false" ) ) );
+        info->setSizePrefixDisabled( Boolean::parseBoolean(
+            properties.getProperty( "wireFormat.sizePrefixDisabled",
+                                    "false" ) ) );
+
+        // Create the Openwire Format Object
+        OpenWireFormat* f = new OpenWireFormat( properties );
+
+        // give the format object the ownership
+        f->setPreferedWireFormatInfo( info );
+
+        return f;
+    }
+    AMQ_CATCH_RETHROW( IllegalStateException )
+    AMQ_CATCHALL_THROW( IllegalStateException )
 }
-

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireFormatFactory.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireFormatFactory.h?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireFormatFactory.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireFormatFactory.h Sun Nov 11 08:52:45 2007
@@ -27,8 +27,7 @@
 namespace connector{
 namespace openwire{
 
-    class OpenWireFormatFactory : public wireformat::WireFormatFactory
-    {
+    class OpenWireFormatFactory : public wireformat::WireFormatFactory {
     public:
 
         /**
@@ -45,9 +44,9 @@
          * wireFormat.sizePrefixDisabled
          * wireFormat.maxInactivityDuration
          */
-        OpenWireFormatFactory() {};
+        OpenWireFormatFactory() {}
 
-        virtual ~OpenWireFormatFactory() {};
+        virtual ~OpenWireFormatFactory() {}
 
         /**
          * Creates a new WireFormat Object passing it a set of

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireFormatNegotiator.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireFormatNegotiator.cpp?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireFormatNegotiator.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireFormatNegotiator.cpp Sun Nov 11 08:52:45 2007
@@ -148,7 +148,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 void OpenWireFormatNegotiator::onTransportException(
     Transport* source AMQCPP_UNUSED,
-    const exceptions::ActiveMQException& ex ) {
+    const decaf::lang::Exception& ex ) {
 
     readyCountDownLatch.countDown();
     fire( ex );

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireFormatNegotiator.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireFormatNegotiator.h?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireFormatNegotiator.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireFormatNegotiator.h Sun Nov 11 08:52:45 2007
@@ -20,10 +20,10 @@
 
 #include <activemq/transport/TransportFilter.h>
 #include <activemq/transport/Command.h>
+#include <activemq/connector/openwire/OpenWireFormat.h>
 #include <decaf/util/concurrent/Mutex.h>
 #include <decaf/util/concurrent/CountDownLatch.h>
 #include <decaf/util/concurrent/Concurrent.h>
-#include <activemq/connector/openwire/OpenWireFormat.h>
 
 namespace activemq{
 namespace connector{
@@ -84,7 +84,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.
@@ -95,7 +96,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
@@ -112,9 +114,8 @@
          * @param source The source of the exception
          * @param ex The exception.
          */
-        virtual void onTransportException(
-            transport::Transport* source,
-            const exceptions::ActiveMQException& ex );
+        virtual void onTransportException( transport::Transport* source,
+                                           const decaf::lang::Exception& ex );
 
         /**
          * Starts this transport object and creates the thread for

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireProducerInfo.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireProducerInfo.h?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireProducerInfo.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireProducerInfo.h Sun Nov 11 08:52:45 2007
@@ -27,7 +27,6 @@
 namespace openwire{
 
     class OpenWireProducerInfo : public ProducerInfo {
-
     private:
 
         // Are Message Ids Disabled

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireResponseBuilder.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireResponseBuilder.cpp?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireResponseBuilder.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireResponseBuilder.cpp Sun Nov 11 08:52:45 2007
@@ -65,7 +65,6 @@
     // If this command requires a response we don't know what it is
     // so we throw an exception.
     if( command->isResponseRequired() ) {
-
         throw transport::CommandIOException( __FILE__, __LINE__,
             "OpenWireResponseBuilder - unrecognized command" );
     }

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireResponseBuilder.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireResponseBuilder.h?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireResponseBuilder.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireResponseBuilder.h Sun Nov 11 08:52:45 2007
@@ -27,12 +27,14 @@
     class OpenWireResponseBuilder : public transport::MockTransport::ResponseBuilder{
     public:
 
-        OpenWireResponseBuilder(){}
-        virtual ~OpenWireResponseBuilder(){}
+        OpenWireResponseBuilder() {}
+        virtual ~OpenWireResponseBuilder() {}
 
         virtual transport::Response* buildResponse( const transport::Command* command );
+
         virtual void buildIncomingCommands(
-            const transport::Command* command, decaf::util::Queue<transport::Command*>& queue );
+            const transport::Command* command,
+            decaf::util::Queue<transport::Command*>& queue );
 
     };
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireSessionInfo.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireSessionInfo.h?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireSessionInfo.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireSessionInfo.h Sun Nov 11 08:52:45 2007
@@ -28,7 +28,6 @@
 namespace openwire{
 
     class OpenWireSessionInfo : public SessionInfo {
-
     private:
 
         // The OpenWire Session Info DataStructure for this Session
@@ -52,6 +51,7 @@
             transaction = NULL;
             sessionInfo = NULL;
         }
+        
         virtual ~OpenWireSessionInfo() {
             this->close();
             delete sessionInfo;
@@ -105,7 +105,7 @@
          * Sets the Ack Mode of this Session Info object
          * @param ackMode Ack Mode
          */
-        virtual void setAckMode(cms::Session::AcknowledgeMode ackMode) {
+        virtual void setAckMode( cms::Session::AcknowledgeMode ackMode ) {
             this->ackMode = ackMode;
         }
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireTransactionInfo.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireTransactionInfo.h?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireTransactionInfo.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireTransactionInfo.h Sun Nov 11 08:52:45 2007
@@ -27,7 +27,6 @@
 namespace openwire{
 
     class OpenWireTransactionInfo : public TransactionInfo {
-
     private:
 
         // OpenWire Tramsaction Info Command

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQBytesMessage.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQBytesMessage.cpp?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQBytesMessage.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQBytesMessage.cpp Sun Nov 11 08:52:45 2007
@@ -21,24 +21,20 @@
 using namespace activemq::connector;
 using namespace activemq::connector::openwire;
 using namespace activemq::connector::openwire::commands;
+using namespace activemq::exceptions;
+using namespace decaf::lang;
 
 ////////////////////////////////////////////////////////////////////////////////
 ActiveMQBytesMessage::ActiveMQBytesMessage() :
     ActiveMQMessageBase< cms::BytesMessage >(),
     dataInputStream( &inputStream ),
-    dataOutputStream( &outputStream )
-{
-    clearBody();
-}
+    dataOutputStream( &outputStream ) {
 
-////////////////////////////////////////////////////////////////////////////////
-ActiveMQBytesMessage::~ActiveMQBytesMessage()
-{
+    clearBody();
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-unsigned char ActiveMQBytesMessage::getDataStructureType() const
-{
+unsigned char ActiveMQBytesMessage::getDataStructureType() const {
     return ActiveMQBytesMessage::ID_ACTIVEMQBYTESMESSAGE;
 }
 
@@ -53,8 +49,9 @@
         std::vector<unsigned char>& content = getContent();
         content.insert( content.end(), buffer, buffer + numBytes );
     }
-    AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
-    AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -68,8 +65,9 @@
             return NULL;
         }
     }
-    AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
-    AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -78,8 +76,9 @@
     try{
         return getContent().size();
     }
-    AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
-    AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -89,8 +88,9 @@
         readOnly = true;
         inputStream.setBuffer( getContent() );
     }
-    AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
-    AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -100,8 +100,9 @@
         checkReadOnly();
         return dataInputStream.readBoolean();
     }
-    AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
-    AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -111,8 +112,9 @@
         checkWriteOnly();
         dataOutputStream.writeBoolean( value );
     }
-    AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
-    AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -122,8 +124,9 @@
         checkReadOnly();
         return dataInputStream.readByte();
     }
-    AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
-    AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -133,8 +136,9 @@
         checkWriteOnly();
         dataOutputStream.writeByte( value );
     }
-    AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
-    AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -145,8 +149,9 @@
         checkReadOnly();
         return dataInputStream.read( value );
     }
-    AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
-    AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -156,8 +161,9 @@
         checkWriteOnly();
         dataOutputStream.write( value );
     }
-    AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
-    AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -168,8 +174,9 @@
         checkReadOnly();
         return dataInputStream.read( buffer, 0, 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 )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -181,8 +188,9 @@
         checkWriteOnly();
         dataOutputStream.write( value, offset, 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 )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -192,8 +200,9 @@
         checkReadOnly();
         return dataInputStream.readChar();
     }
-    AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
-    AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -203,8 +212,9 @@
         checkWriteOnly();
         dataOutputStream.writeChar( value );
     }
-    AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
-    AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -214,8 +224,9 @@
         checkReadOnly();
         return dataInputStream.readFloat();
     }
-    AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
-    AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -225,8 +236,9 @@
         checkWriteOnly();
         dataOutputStream.writeFloat( value );
     }
-    AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
-    AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -236,8 +248,9 @@
         checkReadOnly();
         return dataInputStream.readDouble();
     }
-    AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
-    AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -247,8 +260,9 @@
         checkWriteOnly();
         dataOutputStream.writeDouble( value );
     }
-    AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
-    AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -258,8 +272,9 @@
         checkReadOnly();
         return dataInputStream.readShort();
     }
-    AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
-    AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -269,8 +284,9 @@
         checkWriteOnly();
         dataOutputStream.writeShort( value );
     }
-    AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
-    AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -280,8 +296,9 @@
         checkReadOnly();
         return dataInputStream.readUnsignedShort();
     }
-    AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
-    AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -291,8 +308,9 @@
         checkWriteOnly();
         dataOutputStream.writeUnsignedShort( value );
     }
-    AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
-    AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -302,8 +320,9 @@
         checkReadOnly();
         return dataInputStream.readInt();
     }
-    AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
-    AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -313,8 +332,9 @@
         checkWriteOnly();
         dataOutputStream.writeInt( value );
     }
-    AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
-    AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -324,8 +344,9 @@
         checkReadOnly();
         return dataInputStream.readLong();
     }
-    AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
-    AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -335,8 +356,9 @@
         checkWriteOnly();
         dataOutputStream.writeLong( value );
     }
-    AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
-    AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -346,8 +368,9 @@
         checkReadOnly();
         return dataInputStream.readString();
     }
-    AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
-    AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -357,8 +380,9 @@
         checkWriteOnly();
         dataOutputStream.writeChars( value );
     }
-    AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
-    AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -368,8 +392,9 @@
         checkReadOnly();
         return dataInputStream.readUTF();
     }
-    AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
-    AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -379,6 +404,7 @@
         checkWriteOnly();
         dataOutputStream.writeUTF( value );
     }
-    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/ActiveMQBytesMessage.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQBytesMessage.h?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQBytesMessage.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQBytesMessage.h Sun Nov 11 08:52:45 2007
@@ -38,8 +38,8 @@
 namespace commands{
 
     class ActiveMQBytesMessage :
-        public ActiveMQMessageBase< cms::BytesMessage >
-    {
+        public ActiveMQMessageBase< cms::BytesMessage > {
+
     public:
 
         const static unsigned char ID_ACTIVEMQBYTESMESSAGE = 24;
@@ -47,7 +47,7 @@
     public:
 
         ActiveMQBytesMessage();
-        virtual ~ActiveMQBytesMessage();
+        virtual ~ActiveMQBytesMessage() {}
 
         virtual unsigned char getDataStructureType() const;
 
@@ -104,7 +104,7 @@
          * caller is required to delete.
          * @return new copy of this message
          */
-        virtual cms::BytesMessage* clone(void) const {
+        virtual cms::BytesMessage* clone() const {
             return dynamic_cast<cms::BytesMessage*>(
                 this->cloneDataStructure() );
         }
@@ -144,13 +144,13 @@
          * to expect.
          * @return const pointer to a byte buffer
          */
-        virtual const unsigned char* getBodyBytes(void) const;
+        virtual const unsigned char* getBodyBytes() const;
 
         /**
          * Returns the number of bytes contained in the body of this message.
          * @return number of bytes.
          */
-        virtual std::size_t getBodyLength(void) const;
+        virtual std::size_t getBodyLength() const;
 
         /**
          * Puts the message body in read-only mode and repositions the stream
@@ -394,7 +394,7 @@
          */
         void checkWriteOnly() const throw (cms::CMSException){
             if( readOnly ){
-                throw decaf::lang::exceptions::IllegalStateException( __FILE__, __LINE__,
+                throw exceptions::ActiveMQException( __FILE__, __LINE__,
                     "message is in read-only mode and cannot be written to" );
             }
         }
@@ -405,7 +405,7 @@
          */
         void checkReadOnly() const throw (cms::CMSException){
             if( !readOnly ){
-                throw decaf::lang::exceptions::IllegalStateException( __FILE__, __LINE__,
+                throw exceptions::ActiveMQException( __FILE__, __LINE__,
                     "message is in write-only mode and cannot be read from" );
             }
         }

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQDestination.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQDestination.cpp?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQDestination.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQDestination.cpp Sun Nov 11 08:52:45 2007
@@ -123,15 +123,14 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-unsigned char ActiveMQDestination::getDataStructureType() const
-{
+unsigned char ActiveMQDestination::getDataStructureType() const {
     return ActiveMQDestination::ID_ACTIVEMQDESTINATION;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 std::string ActiveMQDestination::getClientId(
-    const ActiveMQDestination* destination )
-{
+    const ActiveMQDestination* destination ) {
+	
     std::string answer = "";
     if( destination != NULL && destination->isTemporary() ) {
         std::string name = destination->getPhysicalName();

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

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQMapMessage.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQMapMessage.cpp?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQMapMessage.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQMapMessage.cpp Sun Nov 11 08:52:45 2007
@@ -31,20 +31,17 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 ActiveMQMapMessage::ActiveMQMapMessage() :
-    ActiveMQMessageBase<cms::MapMessage>()
-{
+    ActiveMQMessageBase<cms::MapMessage>() {
     this->map = NULL;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-ActiveMQMapMessage::~ActiveMQMapMessage()
-{
+ActiveMQMapMessage::~ActiveMQMapMessage() {
     delete map;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-unsigned char ActiveMQMapMessage::getDataStructureType() const
-{
+unsigned char ActiveMQMapMessage::getDataStructureType() const {
     return ActiveMQMapMessage::ID_ACTIVEMQMAPMESSAGE;
 }
 
@@ -65,7 +62,7 @@
         }
     }
     AMQ_CATCH_RETHROW( io::IOException )
-    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, io::IOException )
     AMQ_CATCHALL_THROW( io::IOException )
 }
 
@@ -78,6 +75,7 @@
         return *map;
     }
     AMQ_CATCH_RETHROW( NullPointerException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, NullPointerException )
     AMQ_CATCHALL_THROW( NullPointerException )
 }
 
@@ -91,6 +89,7 @@
         return *map;
     }
     AMQ_CATCH_RETHROW( NullPointerException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, NullPointerException )
     AMQ_CATCHALL_THROW( NullPointerException )
 }
 
@@ -118,6 +117,7 @@
         }
     }
     AMQ_CATCH_RETHROW( NullPointerException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, NullPointerException )
     AMQ_CATCHALL_THROW( NullPointerException )
 }
 
@@ -127,8 +127,9 @@
     try{
         return getMap().getKeys();
     }
-    AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
-    AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -137,8 +138,9 @@
     try{
         return getMap().contains( name );
     }
-    AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
-    AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -148,8 +150,9 @@
     try{
         return getMap().getBool( name );
     }
-    AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
-    AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -159,8 +162,9 @@
     try{
         getMap().setBool( name, value );
     }
-    AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
-    AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -170,8 +174,9 @@
     try{
         return getMap().getByte( name );
     }
-    AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
-    AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -182,8 +187,9 @@
     try{
         getMap().setByte( name, value );
     }
-    AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
-    AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -193,8 +199,9 @@
     try{
         return getMap().getByteArray( name );
     }
-    AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
-    AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -205,8 +212,9 @@
     try{
         getMap().setByteArray( name, value );
     }
-    AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
-    AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -216,8 +224,9 @@
     try{
         return getMap().getChar( name );
     }
-    AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
-    AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -227,8 +236,9 @@
     try{
         getMap().setChar( name, value );
     }
-    AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
-    AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -238,8 +248,9 @@
     try{
         return getMap().getDouble( name );
     }
-    AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
-    AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -250,8 +261,9 @@
     try{
         getMap().setDouble( name, value );
     }
-    AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
-    AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -261,8 +273,9 @@
     try{
         return getMap().getFloat( name );
     }
-    AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
-    AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -272,8 +285,9 @@
     try{
         getMap().setFloat( name, value );
     }
-    AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
-    AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -283,8 +297,9 @@
     try{
         return getMap().getInt( name );
     }
-    AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
-    AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -294,8 +309,9 @@
     try{
         getMap().setInt( name, value );
     }
-    AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
-    AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -305,8 +321,9 @@
     try{
         return getMap().getLong( name );
     }
-    AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
-    AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -316,8 +333,9 @@
     try{
         getMap().setLong( name, value );
     }
-    AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
-    AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -327,8 +345,9 @@
     try{
         return getMap().getShort( name );
     }
-    AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
-    AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -338,8 +357,9 @@
     try{
         getMap().setShort( name, value );
     }
-    AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
-    AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -349,8 +369,9 @@
     try{
         return getMap().getString( name );
     }
-    AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
-    AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -361,6 +382,7 @@
     try{
         getMap().setString( name, value );
     }
-    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/ActiveMQMapMessage.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQMapMessage.h?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQMapMessage.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQMapMessage.h Sun Nov 11 08:52:45 2007
@@ -36,8 +36,8 @@
 namespace commands{
 
     class ActiveMQMapMessage :
-        public ActiveMQMessageBase<cms::MapMessage>
-    {
+        public ActiveMQMessageBase<cms::MapMessage> {
+        	
     public:
 
         const static unsigned char ID_ACTIVEMQMAPMESSAGE = 25;
@@ -117,7 +117,7 @@
          * caller is required to delete.
          * @return new copy of this message
          */
-        virtual cms::MapMessage* clone(void) const {
+        virtual cms::MapMessage* clone() const {
             return dynamic_cast<cms::MapMessage*>(
                 this->cloneDataStructure() );
         }
@@ -131,7 +131,7 @@
          *         name of an item in the MapMessage
          * @throws CMSException
          */
-        virtual std::vector<std::string> getMapNames(void) const;
+        virtual std::vector<std::string> getMapNames() const;
 
         /**
          * Indicates whether an item exists in this MapMessage object.

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQMessage.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQMessage.cpp?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQMessage.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQMessage.cpp Sun Nov 11 08:52:45 2007
@@ -25,15 +25,11 @@
 using namespace activemq::connector::openwire::marshal;
 
 ////////////////////////////////////////////////////////////////////////////////
-ActiveMQMessage::ActiveMQMessage() : 
+ActiveMQMessage::ActiveMQMessage() :
     ActiveMQMessageBase<cms::Message>()
 {}
 
 ////////////////////////////////////////////////////////////////////////////////
-ActiveMQMessage::~ActiveMQMessage()
-{}
-
-////////////////////////////////////////////////////////////////////////////////
 unsigned char ActiveMQMessage::getDataStructureType() const {
-    return ActiveMQMessage::ID_ACTIVEMQMESSAGE; 
+    return ActiveMQMessage::ID_ACTIVEMQMESSAGE;
 }

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQMessage.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQMessage.h?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQMessage.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQMessage.h Sun Nov 11 08:52:45 2007
@@ -26,8 +26,8 @@
 namespace commands{
 
     class ActiveMQMessage :
-        public ActiveMQMessageBase<cms::Message>
-    {
+        public ActiveMQMessageBase<cms::Message> {
+
     public:
 
         static const unsigned char ID_ACTIVEMQMESSAGE = 23;
@@ -35,7 +35,7 @@
     public:
 
         ActiveMQMessage();
-        virtual ~ActiveMQMessage();
+        virtual ~ActiveMQMessage() {}
 
         virtual unsigned char getDataStructureType() const;
 
@@ -91,7 +91,7 @@
          * caller is required to delete.
          * @return new copy of this message
          */
-        virtual cms::Message* clone(void) const {
+        virtual cms::Message* clone() const {
             return dynamic_cast<cms::Message*>(
                 this->cloneDataStructure() );
         }

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQMessageBase.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQMessageBase.h?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQMessageBase.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQMessageBase.h Sun Nov 11 08:52:45 2007
@@ -50,6 +50,7 @@
             this->ackHandler = NULL;
             this->redeliveryCount = 0;
         }
+
         virtual ~ActiveMQMessageBase() {}
 
         /**
@@ -96,7 +97,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 )
         }
 
@@ -114,7 +115,7 @@
                     &properties, marshalledProperties );
             }
             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 )
         }
 
@@ -232,6 +233,7 @@
                 this->getAckHandler()->acknowledgeMessage( this );
             }
             AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
+            AMQ_CATCH_EXCEPTION_CONVERT( decaf::lang::Exception, exceptions::ActiveMQException )
             AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
         }
 
@@ -278,7 +280,12 @@
         virtual bool getBooleanProperty( const std::string& name ) const
             throw( cms::CMSException ) {
 
-            return properties.getBool( name );
+            try{
+                return properties.getBool( name );
+            }
+            AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
+            AMQ_CATCH_EXCEPTION_CONVERT( decaf::lang::Exception, exceptions::ActiveMQException )
+            AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
         }
 
         /**
@@ -290,7 +297,12 @@
         virtual unsigned char getByteProperty( const std::string& name ) const
             throw( cms::CMSException ) {
 
-            return properties.getByte( name );
+            try{
+                return properties.getByte( name );
+            }
+            AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
+            AMQ_CATCH_EXCEPTION_CONVERT( decaf::lang::Exception, exceptions::ActiveMQException )
+            AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
         }
 
         /**
@@ -302,7 +314,12 @@
         virtual double getDoubleProperty( const std::string& name ) const
             throw( cms::CMSException ) {
 
-            return properties.getDouble( name );
+            try{
+                return properties.getDouble( name );
+            }
+            AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
+            AMQ_CATCH_EXCEPTION_CONVERT( decaf::lang::Exception, exceptions::ActiveMQException )
+            AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
         }
 
         /**
@@ -314,7 +331,12 @@
         virtual float getFloatProperty( const std::string& name ) const
             throw( cms::CMSException ) {
 
-            return properties.getFloat( name );
+            try{
+                return properties.getFloat( name );
+            }
+            AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
+            AMQ_CATCH_EXCEPTION_CONVERT( decaf::lang::Exception, exceptions::ActiveMQException )
+            AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
         }
 
         /**
@@ -326,7 +348,12 @@
         virtual int getIntProperty( const std::string& name ) const
             throw( cms::CMSException ) {
 
-            return properties.getInt( name );
+            try{
+                return properties.getInt( name );
+            }
+            AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
+            AMQ_CATCH_EXCEPTION_CONVERT( decaf::lang::Exception, exceptions::ActiveMQException )
+            AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
         }
 
         /**
@@ -338,7 +365,12 @@
         virtual long long getLongProperty( const std::string& name ) const
             throw( cms::CMSException ) {
 
-            return properties.getLong( name );
+            try{
+                return properties.getLong( name );
+            }
+            AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
+            AMQ_CATCH_EXCEPTION_CONVERT( decaf::lang::Exception, exceptions::ActiveMQException )
+            AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
         }
 
         /**
@@ -350,7 +382,12 @@
         virtual short getShortProperty( const std::string& name ) const
             throw( cms::CMSException ) {
 
-            return properties.getShort( name );
+            try{
+                return properties.getShort( name );
+            }
+            AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
+            AMQ_CATCH_EXCEPTION_CONVERT( decaf::lang::Exception, exceptions::ActiveMQException )
+            AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
         }
 
         /**
@@ -362,7 +399,12 @@
         virtual std::string getStringProperty( const std::string& name ) const
             throw( cms::CMSException ) {
 
-            return properties.getString( name );
+            try{
+                return properties.getString( name );
+            }
+            AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
+            AMQ_CATCH_EXCEPTION_CONVERT( decaf::lang::Exception, exceptions::ActiveMQException )
+            AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
         }
 
         /**
@@ -375,7 +417,12 @@
                                          bool value )
                                             throw( cms::CMSException ) {
 
-            properties.setBool( name, value );
+            try{
+                properties.setBool( name, value );
+            }
+            AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
+            AMQ_CATCH_EXCEPTION_CONVERT( decaf::lang::Exception, exceptions::ActiveMQException )
+            AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
         }
 
         /**
@@ -388,7 +435,12 @@
                                       unsigned char value )
                                         throw( cms::CMSException ) {
 
-            properties.setByte( name, value );
+            try{
+                properties.setByte( name, value );
+            }
+            AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
+            AMQ_CATCH_EXCEPTION_CONVERT( decaf::lang::Exception, exceptions::ActiveMQException )
+            AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
         }
 
         /**
@@ -401,7 +453,12 @@
                                         double value )
                                             throw( cms::CMSException ) {
 
-            properties.setDouble( name, value );
+            try{
+                properties.setDouble( name, value );
+            }
+            AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
+            AMQ_CATCH_EXCEPTION_CONVERT( decaf::lang::Exception, exceptions::ActiveMQException )
+            AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
         }
 
         /**
@@ -414,7 +471,12 @@
                                        float value )
                                         throw( cms::CMSException ) {
 
-            properties.setFloat( name, value );
+            try{
+                properties.setFloat( name, value );
+            }
+            AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
+            AMQ_CATCH_EXCEPTION_CONVERT( decaf::lang::Exception, exceptions::ActiveMQException )
+            AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
         }
 
         /**
@@ -427,7 +489,12 @@
                                      int value )
                                         throw( cms::CMSException ) {
 
-            properties.setInt( name, value );
+            try{
+                properties.setInt( name, value );
+            }
+            AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
+            AMQ_CATCH_EXCEPTION_CONVERT( decaf::lang::Exception, exceptions::ActiveMQException )
+            AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
         }
 
         /**
@@ -440,7 +507,12 @@
                                       long long value )
                                         throw( cms::CMSException ) {
 
-            properties.setLong( name, value );
+            try{
+                properties.setLong( name, value );
+            }
+            AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
+            AMQ_CATCH_EXCEPTION_CONVERT( decaf::lang::Exception, exceptions::ActiveMQException )
+            AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
         }
 
         /**
@@ -453,7 +525,12 @@
                                        short value )
                                         throw( cms::CMSException ) {
 
-            properties.setShort( name, value );
+            try{
+                properties.setShort( name, value );
+            }
+            AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
+            AMQ_CATCH_EXCEPTION_CONVERT( decaf::lang::Exception, exceptions::ActiveMQException )
+            AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
         }
 
         /**
@@ -466,7 +543,12 @@
                                         const std::string& value )
                                             throw( cms::CMSException ) {
 
-            properties.setString( name, value );
+            try{
+                properties.setString( name, value );
+            }
+            AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
+            AMQ_CATCH_EXCEPTION_CONVERT( decaf::lang::Exception, exceptions::ActiveMQException )
+            AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
         }
 
         /**
@@ -530,7 +612,7 @@
          * Gets the Expiration Time for this Message
          * @return time value
          */
-        virtual long long getCMSExpiration(void) const {
+        virtual long long getCMSExpiration() const {
             return this->getExpiration();
         }
 
@@ -546,7 +628,7 @@
          * Gets the CMS Message Id for this Message
          * @return time value
          */
-        virtual std::string getCMSMessageID(void) const {
+        virtual std::string getCMSMessageID() const {
             return marshal::BaseDataStreamMarshaller::toString( this->getMessageId() );
         }
 
@@ -560,7 +642,7 @@
          * Gets the Priority Value for this Message
          * @return priority value
          */
-        virtual int getCMSPriority(void) const {
+        virtual int getCMSPriority() const {
             return this->getPriority();
         }
 
@@ -576,7 +658,7 @@
          * Gets the Redelivered Flag for this Message
          * @return redelivered value
          */
-        virtual bool getCMSRedelivered(void) const {
+        virtual bool getCMSRedelivered() const {
             return this->getRedeliveryCounter() != 0;
         }
 
@@ -615,7 +697,7 @@
          * Gets the Time Stamp for this Message
          * @return time stamp value
          */
-        virtual long long getCMSTimestamp(void) const {
+        virtual long long getCMSTimestamp() const {
             return this->getTimestamp();
         }
 
@@ -631,7 +713,7 @@
          * Gets the CMS Message Type for this Message
          * @return type value
          */
-        virtual std::string getCMSType(void) const {
+        virtual std::string getCMSType() const {
             return this->getType();
         }
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQObjectMessage.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQObjectMessage.cpp?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQObjectMessage.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQObjectMessage.cpp Sun Nov 11 08:52:45 2007
@@ -24,17 +24,10 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 ActiveMQObjectMessage::ActiveMQObjectMessage() :
-    ActiveMQMessageBase<cms::ObjectMessage>()
-{
+    ActiveMQMessageBase<cms::ObjectMessage>() {
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-ActiveMQObjectMessage::~ActiveMQObjectMessage()
-{
-}
-
-////////////////////////////////////////////////////////////////////////////////
-unsigned char ActiveMQObjectMessage::getDataStructureType() const
-{
-    return ActiveMQObjectMessage::ID_ACTIVEMQOBJECTMESSAGE; 
+unsigned char ActiveMQObjectMessage::getDataStructureType() const {
+    return ActiveMQObjectMessage::ID_ACTIVEMQOBJECTMESSAGE;
 }

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQObjectMessage.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQObjectMessage.h?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQObjectMessage.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQObjectMessage.h Sun Nov 11 08:52:45 2007
@@ -32,8 +32,8 @@
 namespace commands{
 
     class ActiveMQObjectMessage :
-        public ActiveMQMessageBase<cms::ObjectMessage>
-    {
+        public ActiveMQMessageBase<cms::ObjectMessage> {
+
     public:
 
         const static unsigned char ID_ACTIVEMQOBJECTMESSAGE = 26;
@@ -41,7 +41,7 @@
     public:
 
         ActiveMQObjectMessage();
-        virtual ~ActiveMQObjectMessage();
+        virtual ~ActiveMQObjectMessage() {}
 
         virtual unsigned char getDataStructureType() const;
 
@@ -97,7 +97,7 @@
          * caller is required to delete.
          * @return new copy of this message
          */
-        virtual cms::Message* clone(void) const {
+        virtual cms::Message* clone() const {
             return dynamic_cast<cms::Message*>(
                 this->cloneDataStructure() );
         }

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

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQQueue.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQQueue.h?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQQueue.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQQueue.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/Queue.h>
 #include <vector>
 #include <string>
@@ -34,8 +36,7 @@
 namespace commands{
 
     class ActiveMQQueue : public ActiveMQDestination,
-                          public cms::Queue
-    {
+                          public cms::Queue {
     public:
 
         const static unsigned char ID_ACTIVEMQQUEUE = 100;
@@ -44,7 +45,7 @@
 
         ActiveMQQueue();
         ActiveMQQueue( const std::string& name );
-        virtual ~ActiveMQQueue();
+        virtual ~ActiveMQQueue() {}
 
         virtual unsigned char getDataStructureType() const;
 
@@ -117,7 +118,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();
         }
 
@@ -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 getQueueName() 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/ActiveMQStreamMessage.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQStreamMessage.cpp?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQStreamMessage.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQStreamMessage.cpp Sun Nov 11 08:52:45 2007
@@ -23,18 +23,15 @@
 using namespace activemq::connector::openwire::commands;
 
 ////////////////////////////////////////////////////////////////////////////////
-ActiveMQStreamMessage::ActiveMQStreamMessage()
-{
+ActiveMQStreamMessage::ActiveMQStreamMessage() {
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-ActiveMQStreamMessage::~ActiveMQStreamMessage()
-{
+ActiveMQStreamMessage::~ActiveMQStreamMessage() {
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-unsigned char ActiveMQStreamMessage::getDataStructureType() const
-{
+unsigned char ActiveMQStreamMessage::getDataStructureType() const {
     return ActiveMQStreamMessage::ID_ACTIVEMQSTREAMMESSAGE; 
 }
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQStreamMessage.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQStreamMessage.h?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQStreamMessage.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQStreamMessage.h Sun Nov 11 08:52:45 2007
@@ -32,11 +32,7 @@
 namespace openwire{
 namespace commands{
 
-    class ActiveMQStreamMessage : public ActiveMQMessage
-    {
-    protected:
-
-
+    class ActiveMQStreamMessage : public ActiveMQMessage {
     public:
 
         const static unsigned char ID_ACTIVEMQSTREAMMESSAGE = 27;

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQTempDestination.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQTempDestination.cpp?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQTempDestination.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQTempDestination.cpp Sun Nov 11 08:52:45 2007
@@ -28,23 +28,20 @@
 ////////////////////////////////////////////////////////////////////////////////
 ActiveMQTempDestination::ActiveMQTempDestination() :
     ActiveMQDestination(),
-    connector( NULL )
-{
+    connector( NULL ) {
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 ActiveMQTempDestination::ActiveMQTempDestination( const std::string& name ) :
     ActiveMQDestination( name ),
-    connector( NULL )
-{}
+    connector( NULL ) {
+}
 
 ////////////////////////////////////////////////////////////////////////////////
-ActiveMQTempDestination::~ActiveMQTempDestination()
-{
+ActiveMQTempDestination::~ActiveMQTempDestination() {
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-unsigned char ActiveMQTempDestination::getDataStructureType() const
-{
+unsigned char ActiveMQTempDestination::getDataStructureType() const {
     return ActiveMQTempDestination::ID_ACTIVEMQTEMPDESTINATION;
 }

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

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQTempQueue.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQTempQueue.cpp?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQTempQueue.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQTempQueue.cpp Sun Nov 11 08:52:45 2007
@@ -23,8 +23,7 @@
 using namespace activemq::connector::openwire::commands;
 
 ////////////////////////////////////////////////////////////////////////////////
-ActiveMQTempQueue::ActiveMQTempQueue() : ActiveMQTempDestination()
-{
+ActiveMQTempQueue::ActiveMQTempQueue() : ActiveMQTempDestination() {
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -33,8 +32,7 @@
 {}
 
 ////////////////////////////////////////////////////////////////////////////////
-ActiveMQTempQueue::~ActiveMQTempQueue()
-{
+ActiveMQTempQueue::~ActiveMQTempQueue() {
     try {
         this->close();
     }
@@ -42,8 +40,6 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-unsigned char ActiveMQTempQueue::getDataStructureType() const
-{
+unsigned char ActiveMQTempQueue::getDataStructureType() const {
     return ActiveMQTempQueue::ID_ACTIVEMQTEMPQUEUE;
 }
-

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQTempQueue.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQTempQueue.h?rev=593929&r1=593928&r2=593929&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQTempQueue.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQTempQueue.h Sun Nov 11 08:52:45 2007
@@ -34,11 +34,7 @@
 namespace commands{
 
     class ActiveMQTempQueue : public ActiveMQTempDestination,
-                              public cms::TemporaryQueue
-    {
-    protected:
-
-
+                              public cms::TemporaryQueue {
     public:
 
         const static unsigned char ID_ACTIVEMQTEMPQUEUE = 102;
@@ -109,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_QUEUE;
         }
 
@@ -119,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();
         }
 
@@ -128,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() );
         }
@@ -158,9 +154,15 @@
          * Gets the name of this queue.
          * @return The queue name.
          */
-        virtual std::string getQueueName(void) const
+        virtual std::string getQueueName() 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 )
         }
 
         /**
@@ -168,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 )
         }
 
     };



Mime
View raw message