activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r510313 [3/5] - /activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/
Date Wed, 21 Feb 2007 23:41:54 GMT
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/DiscoveryEventMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/DiscoveryEventMarshaller.cpp?view=diff&rev=510313&r1=510312&r2=510313
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/DiscoveryEventMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/DiscoveryEventMarshaller.cpp Wed Feb 21 15:41:51 2007
@@ -48,56 +48,86 @@
 ///////////////////////////////////////////////////////////////////////////////
 void DiscoveryEventMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ) {
 
-    BaseDataStreamMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+    try {
 
-    DiscoveryEvent* info =
-        dynamic_cast<DiscoveryEvent*>( dataStructure );
-    info->setServiceName( tightUnmarshalString( dataIn, bs ) );
-    info->setBrokerName( tightUnmarshalString( dataIn, bs ) );
+        BaseDataStreamMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+
+        DiscoveryEvent* info =
+            dynamic_cast<DiscoveryEvent*>( dataStructure );
+        info->setServiceName( tightUnmarshalString( dataIn, bs ) );
+        info->setBrokerName( tightUnmarshalString( dataIn, bs ) );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 int DiscoveryEventMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ) {
 
-    DiscoveryEvent* info =
-        dynamic_cast<DiscoveryEvent*>( dataStructure );
+    try {
 
-    int rc = BaseDataStreamMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
-    rc += tightMarshalString1( info->getServiceName(), bs );
-    rc += tightMarshalString1( info->getBrokerName(), bs );
+        DiscoveryEvent* info =
+            dynamic_cast<DiscoveryEvent*>( dataStructure );
 
-    return rc + 0;
+        int rc = BaseDataStreamMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
+        rc += tightMarshalString1( info->getServiceName(), bs );
+        rc += tightMarshalString1( info->getBrokerName(), bs );
+
+        return rc + 0;
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void DiscoveryEventMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ) {
 
-    BaseDataStreamMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+    try {
+
+        BaseDataStreamMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
 
-    DiscoveryEvent* info =
-        dynamic_cast<DiscoveryEvent*>( dataStructure );
-    tightMarshalString2( info->getServiceName(), dataOut, bs );
-    tightMarshalString2( info->getBrokerName(), dataOut, bs );
+        DiscoveryEvent* info =
+            dynamic_cast<DiscoveryEvent*>( dataStructure );
+        tightMarshalString2( info->getServiceName(), dataOut, bs );
+        tightMarshalString2( info->getBrokerName(), dataOut, bs );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void DiscoveryEventMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ) {
 
-    BaseDataStreamMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
-    DiscoveryEvent* info =
-        dynamic_cast<DiscoveryEvent*>( dataStructure );
-    info->setServiceName( looseUnmarshalString( dataIn ) );
-    info->setBrokerName( looseUnmarshalString( dataIn ) );
+    try {
+
+        BaseDataStreamMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+        DiscoveryEvent* info =
+            dynamic_cast<DiscoveryEvent*>( dataStructure );
+        info->setServiceName( looseUnmarshalString( dataIn ) );
+        info->setBrokerName( looseUnmarshalString( dataIn ) );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void DiscoveryEventMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ) {
 
-    DiscoveryEvent* info =
-        dynamic_cast<DiscoveryEvent*>( dataStructure );
-    BaseDataStreamMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+    try {
 
-    looseMarshalString( info->getServiceName(), dataOut );
-    looseMarshalString( info->getBrokerName(), dataOut );
+        DiscoveryEvent* info =
+            dynamic_cast<DiscoveryEvent*>( dataStructure );
+         BaseDataStreamMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+
+        looseMarshalString( info->getServiceName(), dataOut );
+        looseMarshalString( info->getBrokerName(), dataOut );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ExceptionResponseMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ExceptionResponseMarshaller.cpp?view=diff&rev=510313&r1=510312&r2=510313
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ExceptionResponseMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ExceptionResponseMarshaller.cpp Wed Feb 21 15:41:51 2007
@@ -48,53 +48,83 @@
 ///////////////////////////////////////////////////////////////////////////////
 void ExceptionResponseMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ) {
 
-    ResponseMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+    try {
 
-    ExceptionResponse* info =
-        dynamic_cast<ExceptionResponse*>( dataStructure );
-    info->setException( dynamic_cast< BrokerError* >(
-        tightUnmarshalBrokerError( wireFormat, dataIn, bs ) ) );
+        ResponseMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+
+        ExceptionResponse* info =
+            dynamic_cast<ExceptionResponse*>( dataStructure );
+        info->setException( dynamic_cast< BrokerError* >(
+            tightUnmarshalBrokerError( wireFormat, dataIn, bs ) ) );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 int ExceptionResponseMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ) {
 
-    ExceptionResponse* info =
-        dynamic_cast<ExceptionResponse*>( dataStructure );
+    try {
+
+        ExceptionResponse* info =
+            dynamic_cast<ExceptionResponse*>( dataStructure );
 
-    int rc = ResponseMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
-    rc += tightMarshalBrokerError1( wireFormat, info->getException(), bs );
+        int rc = ResponseMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
+        rc += tightMarshalBrokerError1( wireFormat, info->getException(), bs );
 
-    return rc + 0;
+        return rc + 0;
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void ExceptionResponseMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ) {
 
-    ResponseMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+    try {
 
-    ExceptionResponse* info =
-        dynamic_cast<ExceptionResponse*>( dataStructure );
-    tightMarshalBrokerError2( wireFormat, info->getException(), dataOut, bs );
+        ResponseMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+
+        ExceptionResponse* info =
+            dynamic_cast<ExceptionResponse*>( dataStructure );
+        tightMarshalBrokerError2( wireFormat, info->getException(), dataOut, bs );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void ExceptionResponseMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ) {
 
-    ResponseMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
-    ExceptionResponse* info =
-        dynamic_cast<ExceptionResponse*>( dataStructure );
-    info->setException( dynamic_cast< BrokerError* >(
-        looseUnmarshalBrokerError( wireFormat, dataIn ) ) );
+    try {
+
+        ResponseMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+        ExceptionResponse* info =
+            dynamic_cast<ExceptionResponse*>( dataStructure );
+        info->setException( dynamic_cast< BrokerError* >(
+            looseUnmarshalBrokerError( wireFormat, dataIn ) ) );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void ExceptionResponseMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ) {
 
-    ExceptionResponse* info =
-        dynamic_cast<ExceptionResponse*>( dataStructure );
-    ResponseMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+    try {
 
-    looseMarshalBrokerError( wireFormat, info->getException(), dataOut );
+        ExceptionResponse* info =
+            dynamic_cast<ExceptionResponse*>( dataStructure );
+         ResponseMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+
+        looseMarshalBrokerError( wireFormat, info->getException(), dataOut );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/FlushCommandMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/FlushCommandMarshaller.cpp?view=diff&rev=510313&r1=510312&r2=510313
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/FlushCommandMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/FlushCommandMarshaller.cpp Wed Feb 21 15:41:51 2007
@@ -48,35 +48,65 @@
 ///////////////////////////////////////////////////////////////////////////////
 void FlushCommandMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ) {
 
-    BaseCommandMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+    try {
 
+        BaseCommandMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 int FlushCommandMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ) {
 
-    int rc = BaseCommandMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
+    try {
+
+        int rc = BaseCommandMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
 
-    return rc + 0;
+        return rc + 0;
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void FlushCommandMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ) {
 
-    BaseCommandMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+    try {
+
+        BaseCommandMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
 
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void FlushCommandMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ) {
 
-    BaseCommandMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+    try {
+
+        BaseCommandMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void FlushCommandMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ) {
 
-    BaseCommandMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+    try {
+
+         BaseCommandMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
 
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/IntegerResponseMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/IntegerResponseMarshaller.cpp?view=diff&rev=510313&r1=510312&r2=510313
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/IntegerResponseMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/IntegerResponseMarshaller.cpp Wed Feb 21 15:41:51 2007
@@ -48,47 +48,77 @@
 ///////////////////////////////////////////////////////////////////////////////
 void IntegerResponseMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ) {
 
-    ResponseMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+    try {
 
-    IntegerResponse* info =
-        dynamic_cast<IntegerResponse*>( dataStructure );
-    info->setResult( dataIn->readInt() );
+        ResponseMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+
+        IntegerResponse* info =
+            dynamic_cast<IntegerResponse*>( dataStructure );
+        info->setResult( dataIn->readInt() );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 int IntegerResponseMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ) {
 
-    int rc = ResponseMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
+    try {
+
+        int rc = ResponseMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
 
-    return rc + 4;
+        return rc + 4;
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void IntegerResponseMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ) {
 
-    ResponseMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+    try {
 
-    IntegerResponse* info =
-        dynamic_cast<IntegerResponse*>( dataStructure );
-    dataOut->writeInt( info->getResult() );
+        ResponseMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+
+        IntegerResponse* info =
+            dynamic_cast<IntegerResponse*>( dataStructure );
+        dataOut->writeInt( info->getResult() );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void IntegerResponseMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ) {
 
-    ResponseMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
-    IntegerResponse* info =
-        dynamic_cast<IntegerResponse*>( dataStructure );
-    info->setResult( dataIn->readInt() );
+    try {
+
+        ResponseMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+        IntegerResponse* info =
+            dynamic_cast<IntegerResponse*>( dataStructure );
+        info->setResult( dataIn->readInt() );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void IntegerResponseMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ) {
 
-    IntegerResponse* info =
-        dynamic_cast<IntegerResponse*>( dataStructure );
-    ResponseMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+    try {
 
-    dataOut->writeInt( info->getResult() );
+        IntegerResponse* info =
+            dynamic_cast<IntegerResponse*>( dataStructure );
+         ResponseMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+
+        dataOut->writeInt( info->getResult() );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/JournalQueueAckMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/JournalQueueAckMarshaller.cpp?view=diff&rev=510313&r1=510312&r2=510313
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/JournalQueueAckMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/JournalQueueAckMarshaller.cpp Wed Feb 21 15:41:51 2007
@@ -48,60 +48,90 @@
 ///////////////////////////////////////////////////////////////////////////////
 void JournalQueueAckMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ) {
 
-    BaseDataStreamMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+    try {
 
-    JournalQueueAck* info =
-        dynamic_cast<JournalQueueAck*>( dataStructure );
-    info->setDestination( dynamic_cast< ActiveMQDestination* >(
-        tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) );
-    info->setMessageAck( dynamic_cast< MessageAck* >(
-        tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) );
+        BaseDataStreamMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+
+        JournalQueueAck* info =
+            dynamic_cast<JournalQueueAck*>( dataStructure );
+        info->setDestination( dynamic_cast< ActiveMQDestination* >(
+            tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) );
+        info->setMessageAck( dynamic_cast< MessageAck* >(
+            tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 int JournalQueueAckMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ) {
 
-    JournalQueueAck* info =
-        dynamic_cast<JournalQueueAck*>( dataStructure );
+    try {
 
-    int rc = BaseDataStreamMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
-    rc += tightMarshalNestedObject1( wireFormat, info->getDestination(), bs );
-    rc += tightMarshalNestedObject1( wireFormat, info->getMessageAck(), bs );
+        JournalQueueAck* info =
+            dynamic_cast<JournalQueueAck*>( dataStructure );
 
-    return rc + 0;
+        int rc = BaseDataStreamMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
+        rc += tightMarshalNestedObject1( wireFormat, info->getDestination(), bs );
+        rc += tightMarshalNestedObject1( wireFormat, info->getMessageAck(), bs );
+
+        return rc + 0;
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void JournalQueueAckMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ) {
 
-    BaseDataStreamMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+    try {
+
+        BaseDataStreamMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
 
-    JournalQueueAck* info =
-        dynamic_cast<JournalQueueAck*>( dataStructure );
-    tightMarshalNestedObject2( wireFormat, info->getDestination(), dataOut, bs );
-    tightMarshalNestedObject2( wireFormat, info->getMessageAck(), dataOut, bs );
+        JournalQueueAck* info =
+            dynamic_cast<JournalQueueAck*>( dataStructure );
+        tightMarshalNestedObject2( wireFormat, info->getDestination(), dataOut, bs );
+        tightMarshalNestedObject2( wireFormat, info->getMessageAck(), dataOut, bs );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void JournalQueueAckMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ) {
 
-    BaseDataStreamMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
-    JournalQueueAck* info =
-        dynamic_cast<JournalQueueAck*>( dataStructure );
-    info->setDestination( dynamic_cast< ActiveMQDestination* >( 
-        looseUnmarshalNestedObject( wireFormat, dataIn ) ) );
-    info->setMessageAck( dynamic_cast< MessageAck* >( 
-        looseUnmarshalNestedObject( wireFormat, dataIn ) ) );
+    try {
+
+        BaseDataStreamMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+        JournalQueueAck* info =
+            dynamic_cast<JournalQueueAck*>( dataStructure );
+        info->setDestination( dynamic_cast< ActiveMQDestination* >( 
+            looseUnmarshalNestedObject( wireFormat, dataIn ) ) );
+        info->setMessageAck( dynamic_cast< MessageAck* >( 
+            looseUnmarshalNestedObject( wireFormat, dataIn ) ) );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void JournalQueueAckMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ) {
 
-    JournalQueueAck* info =
-        dynamic_cast<JournalQueueAck*>( dataStructure );
-    BaseDataStreamMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+    try {
 
-    looseMarshalNestedObject( wireFormat, info->getDestination(), dataOut );
-    looseMarshalNestedObject( wireFormat, info->getMessageAck(), dataOut );
+        JournalQueueAck* info =
+            dynamic_cast<JournalQueueAck*>( dataStructure );
+         BaseDataStreamMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+
+        looseMarshalNestedObject( wireFormat, info->getDestination(), dataOut );
+        looseMarshalNestedObject( wireFormat, info->getMessageAck(), dataOut );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/JournalTopicAckMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/JournalTopicAckMarshaller.cpp?view=diff&rev=510313&r1=510312&r2=510313
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/JournalTopicAckMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/JournalTopicAckMarshaller.cpp Wed Feb 21 15:41:51 2007
@@ -48,82 +48,112 @@
 ///////////////////////////////////////////////////////////////////////////////
 void JournalTopicAckMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ) {
 
-    BaseDataStreamMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+    try {
 
-    JournalTopicAck* info =
-        dynamic_cast<JournalTopicAck*>( dataStructure );
-    info->setDestination( dynamic_cast< ActiveMQDestination* >(
-        tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) );
-    info->setMessageId( dynamic_cast< MessageId* >(
-        tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) );
-    info->setMessageSequenceId( tightUnmarshalLong( wireFormat, dataIn, bs ) );
-    info->setSubscritionName( tightUnmarshalString( dataIn, bs ) );
-    info->setClientId( tightUnmarshalString( dataIn, bs ) );
-    info->setTransactionId( dynamic_cast< TransactionId* >(
-        tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) );
+        BaseDataStreamMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+
+        JournalTopicAck* info =
+            dynamic_cast<JournalTopicAck*>( dataStructure );
+        info->setDestination( dynamic_cast< ActiveMQDestination* >(
+            tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) );
+        info->setMessageId( dynamic_cast< MessageId* >(
+            tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) );
+        info->setMessageSequenceId( tightUnmarshalLong( wireFormat, dataIn, bs ) );
+        info->setSubscritionName( tightUnmarshalString( dataIn, bs ) );
+        info->setClientId( tightUnmarshalString( dataIn, bs ) );
+        info->setTransactionId( dynamic_cast< TransactionId* >(
+            tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 int JournalTopicAckMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ) {
 
-    JournalTopicAck* info =
-        dynamic_cast<JournalTopicAck*>( dataStructure );
+    try {
 
-    int rc = BaseDataStreamMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
-    rc += tightMarshalNestedObject1( wireFormat, info->getDestination(), bs );
-    rc += tightMarshalNestedObject1( wireFormat, info->getMessageId(), bs );
-    rc += tightMarshalLong1( wireFormat, info->getMessageSequenceId(), bs );
-    rc += tightMarshalString1( info->getSubscritionName(), bs );
-    rc += tightMarshalString1( info->getClientId(), bs );
-    rc += tightMarshalNestedObject1( wireFormat, info->getTransactionId(), bs );
+        JournalTopicAck* info =
+            dynamic_cast<JournalTopicAck*>( dataStructure );
 
-    return rc + 0;
+        int rc = BaseDataStreamMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
+        rc += tightMarshalNestedObject1( wireFormat, info->getDestination(), bs );
+        rc += tightMarshalNestedObject1( wireFormat, info->getMessageId(), bs );
+        rc += tightMarshalLong1( wireFormat, info->getMessageSequenceId(), bs );
+        rc += tightMarshalString1( info->getSubscritionName(), bs );
+        rc += tightMarshalString1( info->getClientId(), bs );
+        rc += tightMarshalNestedObject1( wireFormat, info->getTransactionId(), bs );
+
+        return rc + 0;
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void JournalTopicAckMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ) {
 
-    BaseDataStreamMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+    try {
+
+        BaseDataStreamMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
 
-    JournalTopicAck* info =
-        dynamic_cast<JournalTopicAck*>( dataStructure );
-    tightMarshalNestedObject2( wireFormat, info->getDestination(), dataOut, bs );
-    tightMarshalNestedObject2( wireFormat, info->getMessageId(), dataOut, bs );
-    tightMarshalLong2( wireFormat, info->getMessageSequenceId(), dataOut, bs );
-    tightMarshalString2( info->getSubscritionName(), dataOut, bs );
-    tightMarshalString2( info->getClientId(), dataOut, bs );
-    tightMarshalNestedObject2( wireFormat, info->getTransactionId(), dataOut, bs );
+        JournalTopicAck* info =
+            dynamic_cast<JournalTopicAck*>( dataStructure );
+        tightMarshalNestedObject2( wireFormat, info->getDestination(), dataOut, bs );
+        tightMarshalNestedObject2( wireFormat, info->getMessageId(), dataOut, bs );
+        tightMarshalLong2( wireFormat, info->getMessageSequenceId(), dataOut, bs );
+        tightMarshalString2( info->getSubscritionName(), dataOut, bs );
+        tightMarshalString2( info->getClientId(), dataOut, bs );
+        tightMarshalNestedObject2( wireFormat, info->getTransactionId(), dataOut, bs );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void JournalTopicAckMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ) {
 
-    BaseDataStreamMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
-    JournalTopicAck* info =
-        dynamic_cast<JournalTopicAck*>( dataStructure );
-    info->setDestination( dynamic_cast< ActiveMQDestination* >( 
-        looseUnmarshalNestedObject( wireFormat, dataIn ) ) );
-    info->setMessageId( dynamic_cast< MessageId* >( 
-        looseUnmarshalNestedObject( wireFormat, dataIn ) ) );
-    info->setMessageSequenceId( looseUnmarshalLong( wireFormat, dataIn ) );
-    info->setSubscritionName( looseUnmarshalString( dataIn ) );
-    info->setClientId( looseUnmarshalString( dataIn ) );
-    info->setTransactionId( dynamic_cast< TransactionId* >( 
-        looseUnmarshalNestedObject( wireFormat, dataIn ) ) );
+    try {
+
+        BaseDataStreamMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+        JournalTopicAck* info =
+            dynamic_cast<JournalTopicAck*>( dataStructure );
+        info->setDestination( dynamic_cast< ActiveMQDestination* >( 
+            looseUnmarshalNestedObject( wireFormat, dataIn ) ) );
+        info->setMessageId( dynamic_cast< MessageId* >( 
+            looseUnmarshalNestedObject( wireFormat, dataIn ) ) );
+        info->setMessageSequenceId( looseUnmarshalLong( wireFormat, dataIn ) );
+        info->setSubscritionName( looseUnmarshalString( dataIn ) );
+        info->setClientId( looseUnmarshalString( dataIn ) );
+        info->setTransactionId( dynamic_cast< TransactionId* >( 
+            looseUnmarshalNestedObject( wireFormat, dataIn ) ) );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void JournalTopicAckMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ) {
 
-    JournalTopicAck* info =
-        dynamic_cast<JournalTopicAck*>( dataStructure );
-    BaseDataStreamMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
-
-    looseMarshalNestedObject( wireFormat, info->getDestination(), dataOut );
-    looseMarshalNestedObject( wireFormat, info->getMessageId(), dataOut );
-    looseMarshalLong( wireFormat, info->getMessageSequenceId(), dataOut );
-    looseMarshalString( info->getSubscritionName(), dataOut );
-    looseMarshalString( info->getClientId(), dataOut );
-    looseMarshalNestedObject( wireFormat, info->getTransactionId(), dataOut );
+    try {
+
+        JournalTopicAck* info =
+            dynamic_cast<JournalTopicAck*>( dataStructure );
+         BaseDataStreamMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+
+        looseMarshalNestedObject( wireFormat, info->getDestination(), dataOut );
+        looseMarshalNestedObject( wireFormat, info->getMessageId(), dataOut );
+        looseMarshalLong( wireFormat, info->getMessageSequenceId(), dataOut );
+        looseMarshalString( info->getSubscritionName(), dataOut );
+        looseMarshalString( info->getClientId(), dataOut );
+        looseMarshalNestedObject( wireFormat, info->getTransactionId(), dataOut );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/JournalTraceMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/JournalTraceMarshaller.cpp?view=diff&rev=510313&r1=510312&r2=510313
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/JournalTraceMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/JournalTraceMarshaller.cpp Wed Feb 21 15:41:51 2007
@@ -48,51 +48,81 @@
 ///////////////////////////////////////////////////////////////////////////////
 void JournalTraceMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ) {
 
-    BaseDataStreamMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+    try {
 
-    JournalTrace* info =
-        dynamic_cast<JournalTrace*>( dataStructure );
-    info->setMessage( tightUnmarshalString( dataIn, bs ) );
+        BaseDataStreamMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+
+        JournalTrace* info =
+            dynamic_cast<JournalTrace*>( dataStructure );
+        info->setMessage( tightUnmarshalString( dataIn, bs ) );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 int JournalTraceMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ) {
 
-    JournalTrace* info =
-        dynamic_cast<JournalTrace*>( dataStructure );
+    try {
+
+        JournalTrace* info =
+            dynamic_cast<JournalTrace*>( dataStructure );
 
-    int rc = BaseDataStreamMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
-    rc += tightMarshalString1( info->getMessage(), bs );
+        int rc = BaseDataStreamMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
+        rc += tightMarshalString1( info->getMessage(), bs );
 
-    return rc + 0;
+        return rc + 0;
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void JournalTraceMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ) {
 
-    BaseDataStreamMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+    try {
 
-    JournalTrace* info =
-        dynamic_cast<JournalTrace*>( dataStructure );
-    tightMarshalString2( info->getMessage(), dataOut, bs );
+        BaseDataStreamMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+
+        JournalTrace* info =
+            dynamic_cast<JournalTrace*>( dataStructure );
+        tightMarshalString2( info->getMessage(), dataOut, bs );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void JournalTraceMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ) {
 
-    BaseDataStreamMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
-    JournalTrace* info =
-        dynamic_cast<JournalTrace*>( dataStructure );
-    info->setMessage( looseUnmarshalString( dataIn ) );
+    try {
+
+        BaseDataStreamMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+        JournalTrace* info =
+            dynamic_cast<JournalTrace*>( dataStructure );
+        info->setMessage( looseUnmarshalString( dataIn ) );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void JournalTraceMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ) {
 
-    JournalTrace* info =
-        dynamic_cast<JournalTrace*>( dataStructure );
-    BaseDataStreamMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+    try {
 
-    looseMarshalString( info->getMessage(), dataOut );
+        JournalTrace* info =
+            dynamic_cast<JournalTrace*>( dataStructure );
+         BaseDataStreamMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+
+        looseMarshalString( info->getMessage(), dataOut );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/JournalTransactionMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/JournalTransactionMarshaller.cpp?view=diff&rev=510313&r1=510312&r2=510313
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/JournalTransactionMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/JournalTransactionMarshaller.cpp Wed Feb 21 15:41:51 2007
@@ -48,62 +48,92 @@
 ///////////////////////////////////////////////////////////////////////////////
 void JournalTransactionMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ) {
 
-    BaseDataStreamMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+    try {
 
-    JournalTransaction* info =
-        dynamic_cast<JournalTransaction*>( dataStructure );
-    info->setTransactionId( dynamic_cast< TransactionId* >(
-        tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) );
-    info->setType( dataIn->readByte() );
-    info->setWasPrepared( bs->readBoolean() );
+        BaseDataStreamMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+
+        JournalTransaction* info =
+            dynamic_cast<JournalTransaction*>( dataStructure );
+        info->setTransactionId( dynamic_cast< TransactionId* >(
+            tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) );
+        info->setType( dataIn->readByte() );
+        info->setWasPrepared( bs->readBoolean() );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 int JournalTransactionMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ) {
 
-    JournalTransaction* info =
-        dynamic_cast<JournalTransaction*>( dataStructure );
+    try {
 
-    int rc = BaseDataStreamMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
-    rc += tightMarshalNestedObject1( wireFormat, info->getTransactionId(), bs );
-    bs->writeBoolean( info->getWasPrepared() );
+        JournalTransaction* info =
+            dynamic_cast<JournalTransaction*>( dataStructure );
 
-    return rc + 1;
+        int rc = BaseDataStreamMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
+        rc += tightMarshalNestedObject1( wireFormat, info->getTransactionId(), bs );
+        bs->writeBoolean( info->getWasPrepared() );
+
+        return rc + 1;
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void JournalTransactionMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ) {
 
-    BaseDataStreamMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+    try {
+
+        BaseDataStreamMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
 
-    JournalTransaction* info =
-        dynamic_cast<JournalTransaction*>( dataStructure );
-    tightMarshalNestedObject2( wireFormat, info->getTransactionId(), dataOut, bs );
-    dataOut->write( info->getType() );
-    bs->readBoolean();
+        JournalTransaction* info =
+            dynamic_cast<JournalTransaction*>( dataStructure );
+        tightMarshalNestedObject2( wireFormat, info->getTransactionId(), dataOut, bs );
+        dataOut->write( info->getType() );
+        bs->readBoolean();
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void JournalTransactionMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ) {
 
-    BaseDataStreamMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
-    JournalTransaction* info =
-        dynamic_cast<JournalTransaction*>( dataStructure );
-    info->setTransactionId( dynamic_cast< TransactionId* >( 
-        looseUnmarshalNestedObject( wireFormat, dataIn ) ) );
-    info->setType( dataIn->readByte() );
-    info->setWasPrepared( dataIn->readBoolean() );
+    try {
+
+        BaseDataStreamMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+        JournalTransaction* info =
+            dynamic_cast<JournalTransaction*>( dataStructure );
+        info->setTransactionId( dynamic_cast< TransactionId* >( 
+            looseUnmarshalNestedObject( wireFormat, dataIn ) ) );
+        info->setType( dataIn->readByte() );
+        info->setWasPrepared( dataIn->readBoolean() );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void JournalTransactionMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ) {
 
-    JournalTransaction* info =
-        dynamic_cast<JournalTransaction*>( dataStructure );
-    BaseDataStreamMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
-
-    looseMarshalNestedObject( wireFormat, info->getTransactionId(), dataOut );
-    dataOut->write( info->getType() );
-    dataOut->writeBoolean( info->getWasPrepared() );
+    try {
+
+        JournalTransaction* info =
+            dynamic_cast<JournalTransaction*>( dataStructure );
+         BaseDataStreamMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+
+        looseMarshalNestedObject( wireFormat, info->getTransactionId(), dataOut );
+        dataOut->write( info->getType() );
+        dataOut->writeBoolean( info->getWasPrepared() );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/KeepAliveInfoMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/KeepAliveInfoMarshaller.cpp?view=diff&rev=510313&r1=510312&r2=510313
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/KeepAliveInfoMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/KeepAliveInfoMarshaller.cpp Wed Feb 21 15:41:51 2007
@@ -48,35 +48,65 @@
 ///////////////////////////////////////////////////////////////////////////////
 void KeepAliveInfoMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ) {
 
-    BaseCommandMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+    try {
 
+        BaseCommandMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 int KeepAliveInfoMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ) {
 
-    int rc = BaseCommandMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
+    try {
+
+        int rc = BaseCommandMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
 
-    return rc + 0;
+        return rc + 0;
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void KeepAliveInfoMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ) {
 
-    BaseCommandMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+    try {
+
+        BaseCommandMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
 
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void KeepAliveInfoMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ) {
 
-    BaseCommandMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+    try {
+
+        BaseCommandMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void KeepAliveInfoMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ) {
 
-    BaseCommandMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+    try {
+
+         BaseCommandMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
 
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/LastPartialCommandMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/LastPartialCommandMarshaller.cpp?view=diff&rev=510313&r1=510312&r2=510313
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/LastPartialCommandMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/LastPartialCommandMarshaller.cpp Wed Feb 21 15:41:51 2007
@@ -48,35 +48,65 @@
 ///////////////////////////////////////////////////////////////////////////////
 void LastPartialCommandMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ) {
 
-    PartialCommandMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+    try {
 
+        PartialCommandMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 int LastPartialCommandMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ) {
 
-    int rc = PartialCommandMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
+    try {
+
+        int rc = PartialCommandMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
 
-    return rc + 0;
+        return rc + 0;
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void LastPartialCommandMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ) {
 
-    PartialCommandMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+    try {
+
+        PartialCommandMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
 
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void LastPartialCommandMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ) {
 
-    PartialCommandMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+    try {
+
+        PartialCommandMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void LastPartialCommandMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ) {
 
-    PartialCommandMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+    try {
+
+         PartialCommandMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
 
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/LocalTransactionIdMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/LocalTransactionIdMarshaller.cpp?view=diff&rev=510313&r1=510312&r2=510313
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/LocalTransactionIdMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/LocalTransactionIdMarshaller.cpp Wed Feb 21 15:41:51 2007
@@ -48,58 +48,88 @@
 ///////////////////////////////////////////////////////////////////////////////
 void LocalTransactionIdMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ) {
 
-    TransactionIdMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+    try {
 
-    LocalTransactionId* info =
-        dynamic_cast<LocalTransactionId*>( dataStructure );
-    info->setValue( tightUnmarshalLong( wireFormat, dataIn, bs ) );
-    info->setConnectionId( dynamic_cast< ConnectionId* >(
-        tightUnmarshalCachedObject( wireFormat, dataIn, bs ) ) );
+        TransactionIdMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+
+        LocalTransactionId* info =
+            dynamic_cast<LocalTransactionId*>( dataStructure );
+        info->setValue( tightUnmarshalLong( wireFormat, dataIn, bs ) );
+        info->setConnectionId( dynamic_cast< ConnectionId* >(
+            tightUnmarshalCachedObject( wireFormat, dataIn, bs ) ) );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 int LocalTransactionIdMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ) {
 
-    LocalTransactionId* info =
-        dynamic_cast<LocalTransactionId*>( dataStructure );
+    try {
 
-    int rc = TransactionIdMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
-    rc += tightMarshalLong1( wireFormat, info->getValue(), bs );
-    rc += tightMarshalCachedObject1( wireFormat, info->getConnectionId(), bs );
+        LocalTransactionId* info =
+            dynamic_cast<LocalTransactionId*>( dataStructure );
 
-    return rc + 0;
+        int rc = TransactionIdMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
+        rc += tightMarshalLong1( wireFormat, info->getValue(), bs );
+        rc += tightMarshalCachedObject1( wireFormat, info->getConnectionId(), bs );
+
+        return rc + 0;
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void LocalTransactionIdMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ) {
 
-    TransactionIdMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+    try {
+
+        TransactionIdMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
 
-    LocalTransactionId* info =
-        dynamic_cast<LocalTransactionId*>( dataStructure );
-    tightMarshalLong2( wireFormat, info->getValue(), dataOut, bs );
-    tightMarshalCachedObject2( wireFormat, info->getConnectionId(), dataOut, bs );
+        LocalTransactionId* info =
+            dynamic_cast<LocalTransactionId*>( dataStructure );
+        tightMarshalLong2( wireFormat, info->getValue(), dataOut, bs );
+        tightMarshalCachedObject2( wireFormat, info->getConnectionId(), dataOut, bs );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void LocalTransactionIdMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ) {
 
-    TransactionIdMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
-    LocalTransactionId* info =
-        dynamic_cast<LocalTransactionId*>( dataStructure );
-    info->setValue( looseUnmarshalLong( wireFormat, dataIn ) );
-    info->setConnectionId( dynamic_cast< ConnectionId* >( 
-        looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
+    try {
+
+        TransactionIdMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+        LocalTransactionId* info =
+            dynamic_cast<LocalTransactionId*>( dataStructure );
+        info->setValue( looseUnmarshalLong( wireFormat, dataIn ) );
+        info->setConnectionId( dynamic_cast< ConnectionId* >( 
+            looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void LocalTransactionIdMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ) {
 
-    LocalTransactionId* info =
-        dynamic_cast<LocalTransactionId*>( dataStructure );
-    TransactionIdMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+    try {
 
-    looseMarshalLong( wireFormat, info->getValue(), dataOut );
-    looseMarshalCachedObject( wireFormat, info->getConnectionId(), dataOut );
+        LocalTransactionId* info =
+            dynamic_cast<LocalTransactionId*>( dataStructure );
+         TransactionIdMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+
+        looseMarshalLong( wireFormat, info->getValue(), dataOut );
+        looseMarshalCachedObject( wireFormat, info->getConnectionId(), dataOut );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessageAckMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessageAckMarshaller.cpp?view=diff&rev=510313&r1=510312&r2=510313
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessageAckMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessageAckMarshaller.cpp Wed Feb 21 15:41:51 2007
@@ -48,89 +48,119 @@
 ///////////////////////////////////////////////////////////////////////////////
 void MessageAckMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ) {
 
-    BaseCommandMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+    try {
 
-    MessageAck* info =
-        dynamic_cast<MessageAck*>( dataStructure );
-    info->setDestination( dynamic_cast< ActiveMQDestination* >(
-        tightUnmarshalCachedObject( wireFormat, dataIn, bs ) ) );
-    info->setTransactionId( dynamic_cast< TransactionId* >(
-        tightUnmarshalCachedObject( wireFormat, dataIn, bs ) ) );
-    info->setConsumerId( dynamic_cast< ConsumerId* >(
-        tightUnmarshalCachedObject( wireFormat, dataIn, bs ) ) );
-    info->setAckType( dataIn->readByte() );
-    info->setFirstMessageId( dynamic_cast< MessageId* >(
-        tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) );
-    info->setLastMessageId( dynamic_cast< MessageId* >(
-        tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) );
-    info->setMessageCount( dataIn->readInt() );
+        BaseCommandMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+
+        MessageAck* info =
+            dynamic_cast<MessageAck*>( dataStructure );
+        info->setDestination( dynamic_cast< ActiveMQDestination* >(
+            tightUnmarshalCachedObject( wireFormat, dataIn, bs ) ) );
+        info->setTransactionId( dynamic_cast< TransactionId* >(
+            tightUnmarshalCachedObject( wireFormat, dataIn, bs ) ) );
+        info->setConsumerId( dynamic_cast< ConsumerId* >(
+            tightUnmarshalCachedObject( wireFormat, dataIn, bs ) ) );
+        info->setAckType( dataIn->readByte() );
+        info->setFirstMessageId( dynamic_cast< MessageId* >(
+            tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) );
+        info->setLastMessageId( dynamic_cast< MessageId* >(
+            tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) );
+        info->setMessageCount( dataIn->readInt() );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 int MessageAckMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ) {
 
-    MessageAck* info =
-        dynamic_cast<MessageAck*>( dataStructure );
+    try {
 
-    int rc = BaseCommandMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
-    rc += tightMarshalCachedObject1( wireFormat, info->getDestination(), bs );
-    rc += tightMarshalCachedObject1( wireFormat, info->getTransactionId(), bs );
-    rc += tightMarshalCachedObject1( wireFormat, info->getConsumerId(), bs );
-    rc += tightMarshalNestedObject1( wireFormat, info->getFirstMessageId(), bs );
-    rc += tightMarshalNestedObject1( wireFormat, info->getLastMessageId(), bs );
+        MessageAck* info =
+            dynamic_cast<MessageAck*>( dataStructure );
 
-    return rc + 5;
+        int rc = BaseCommandMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
+        rc += tightMarshalCachedObject1( wireFormat, info->getDestination(), bs );
+        rc += tightMarshalCachedObject1( wireFormat, info->getTransactionId(), bs );
+        rc += tightMarshalCachedObject1( wireFormat, info->getConsumerId(), bs );
+        rc += tightMarshalNestedObject1( wireFormat, info->getFirstMessageId(), bs );
+        rc += tightMarshalNestedObject1( wireFormat, info->getLastMessageId(), bs );
+
+        return rc + 5;
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void MessageAckMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ) {
 
-    BaseCommandMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+    try {
+
+        BaseCommandMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
 
-    MessageAck* info =
-        dynamic_cast<MessageAck*>( dataStructure );
-    tightMarshalCachedObject2( wireFormat, info->getDestination(), dataOut, bs );
-    tightMarshalCachedObject2( wireFormat, info->getTransactionId(), dataOut, bs );
-    tightMarshalCachedObject2( wireFormat, info->getConsumerId(), dataOut, bs );
-    dataOut->write( info->getAckType() );
-    tightMarshalNestedObject2( wireFormat, info->getFirstMessageId(), dataOut, bs );
-    tightMarshalNestedObject2( wireFormat, info->getLastMessageId(), dataOut, bs );
-    dataOut->writeInt( info->getMessageCount() );
+        MessageAck* info =
+            dynamic_cast<MessageAck*>( dataStructure );
+        tightMarshalCachedObject2( wireFormat, info->getDestination(), dataOut, bs );
+        tightMarshalCachedObject2( wireFormat, info->getTransactionId(), dataOut, bs );
+        tightMarshalCachedObject2( wireFormat, info->getConsumerId(), dataOut, bs );
+        dataOut->write( info->getAckType() );
+        tightMarshalNestedObject2( wireFormat, info->getFirstMessageId(), dataOut, bs );
+        tightMarshalNestedObject2( wireFormat, info->getLastMessageId(), dataOut, bs );
+        dataOut->writeInt( info->getMessageCount() );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void MessageAckMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ) {
 
-    BaseCommandMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
-    MessageAck* info =
-        dynamic_cast<MessageAck*>( dataStructure );
-    info->setDestination( dynamic_cast< ActiveMQDestination* >( 
-        looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
-    info->setTransactionId( dynamic_cast< TransactionId* >( 
-        looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
-    info->setConsumerId( dynamic_cast< ConsumerId* >( 
-        looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
-    info->setAckType( dataIn->readByte() );
-    info->setFirstMessageId( dynamic_cast< MessageId* >( 
-        looseUnmarshalNestedObject( wireFormat, dataIn ) ) );
-    info->setLastMessageId( dynamic_cast< MessageId* >( 
-        looseUnmarshalNestedObject( wireFormat, dataIn ) ) );
-    info->setMessageCount( dataIn->readInt() );
+    try {
+
+        BaseCommandMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+        MessageAck* info =
+            dynamic_cast<MessageAck*>( dataStructure );
+        info->setDestination( dynamic_cast< ActiveMQDestination* >( 
+            looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
+        info->setTransactionId( dynamic_cast< TransactionId* >( 
+            looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
+        info->setConsumerId( dynamic_cast< ConsumerId* >( 
+            looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
+        info->setAckType( dataIn->readByte() );
+        info->setFirstMessageId( dynamic_cast< MessageId* >( 
+            looseUnmarshalNestedObject( wireFormat, dataIn ) ) );
+        info->setLastMessageId( dynamic_cast< MessageId* >( 
+            looseUnmarshalNestedObject( wireFormat, dataIn ) ) );
+        info->setMessageCount( dataIn->readInt() );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void MessageAckMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ) {
 
-    MessageAck* info =
-        dynamic_cast<MessageAck*>( dataStructure );
-    BaseCommandMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
-
-    looseMarshalCachedObject( wireFormat, info->getDestination(), dataOut );
-    looseMarshalCachedObject( wireFormat, info->getTransactionId(), dataOut );
-    looseMarshalCachedObject( wireFormat, info->getConsumerId(), dataOut );
-    dataOut->write( info->getAckType() );
-    looseMarshalNestedObject( wireFormat, info->getFirstMessageId(), dataOut );
-    looseMarshalNestedObject( wireFormat, info->getLastMessageId(), dataOut );
-    dataOut->writeInt( info->getMessageCount() );
+    try {
+
+        MessageAck* info =
+            dynamic_cast<MessageAck*>( dataStructure );
+         BaseCommandMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+
+        looseMarshalCachedObject( wireFormat, info->getDestination(), dataOut );
+        looseMarshalCachedObject( wireFormat, info->getTransactionId(), dataOut );
+        looseMarshalCachedObject( wireFormat, info->getConsumerId(), dataOut );
+        dataOut->write( info->getAckType() );
+        looseMarshalNestedObject( wireFormat, info->getFirstMessageId(), dataOut );
+        looseMarshalNestedObject( wireFormat, info->getLastMessageId(), dataOut );
+        dataOut->writeInt( info->getMessageCount() );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessageDispatchMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessageDispatchMarshaller.cpp?view=diff&rev=510313&r1=510312&r2=510313
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessageDispatchMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessageDispatchMarshaller.cpp Wed Feb 21 15:41:51 2007
@@ -48,71 +48,101 @@
 ///////////////////////////////////////////////////////////////////////////////
 void MessageDispatchMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ) {
 
-    BaseCommandMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+    try {
 
-    MessageDispatch* info =
-        dynamic_cast<MessageDispatch*>( dataStructure );
-    info->setConsumerId( dynamic_cast< ConsumerId* >(
-        tightUnmarshalCachedObject( wireFormat, dataIn, bs ) ) );
-    info->setDestination( dynamic_cast< ActiveMQDestination* >(
-        tightUnmarshalCachedObject( wireFormat, dataIn, bs ) ) );
-    info->setMessage( dynamic_cast< Message* >(
-        tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) );
-    info->setRedeliveryCounter( dataIn->readInt() );
+        BaseCommandMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+
+        MessageDispatch* info =
+            dynamic_cast<MessageDispatch*>( dataStructure );
+        info->setConsumerId( dynamic_cast< ConsumerId* >(
+            tightUnmarshalCachedObject( wireFormat, dataIn, bs ) ) );
+        info->setDestination( dynamic_cast< ActiveMQDestination* >(
+            tightUnmarshalCachedObject( wireFormat, dataIn, bs ) ) );
+        info->setMessage( dynamic_cast< Message* >(
+            tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) );
+        info->setRedeliveryCounter( dataIn->readInt() );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 int MessageDispatchMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ) {
 
-    MessageDispatch* info =
-        dynamic_cast<MessageDispatch*>( dataStructure );
+    try {
 
-    int rc = BaseCommandMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
-    rc += tightMarshalCachedObject1( wireFormat, info->getConsumerId(), bs );
-    rc += tightMarshalCachedObject1( wireFormat, info->getDestination(), bs );
-    rc += tightMarshalNestedObject1( wireFormat, info->getMessage(), bs );
+        MessageDispatch* info =
+            dynamic_cast<MessageDispatch*>( dataStructure );
 
-    return rc + 4;
+        int rc = BaseCommandMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
+        rc += tightMarshalCachedObject1( wireFormat, info->getConsumerId(), bs );
+        rc += tightMarshalCachedObject1( wireFormat, info->getDestination(), bs );
+        rc += tightMarshalNestedObject1( wireFormat, info->getMessage(), bs );
+
+        return rc + 4;
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void MessageDispatchMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ) {
 
-    BaseCommandMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+    try {
+
+        BaseCommandMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
 
-    MessageDispatch* info =
-        dynamic_cast<MessageDispatch*>( dataStructure );
-    tightMarshalCachedObject2( wireFormat, info->getConsumerId(), dataOut, bs );
-    tightMarshalCachedObject2( wireFormat, info->getDestination(), dataOut, bs );
-    tightMarshalNestedObject2( wireFormat, info->getMessage(), dataOut, bs );
-    dataOut->writeInt( info->getRedeliveryCounter() );
+        MessageDispatch* info =
+            dynamic_cast<MessageDispatch*>( dataStructure );
+        tightMarshalCachedObject2( wireFormat, info->getConsumerId(), dataOut, bs );
+        tightMarshalCachedObject2( wireFormat, info->getDestination(), dataOut, bs );
+        tightMarshalNestedObject2( wireFormat, info->getMessage(), dataOut, bs );
+        dataOut->writeInt( info->getRedeliveryCounter() );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void MessageDispatchMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ) {
 
-    BaseCommandMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
-    MessageDispatch* info =
-        dynamic_cast<MessageDispatch*>( dataStructure );
-    info->setConsumerId( dynamic_cast< ConsumerId* >( 
-        looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
-    info->setDestination( dynamic_cast< ActiveMQDestination* >( 
-        looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
-    info->setMessage( dynamic_cast< Message* >( 
-        looseUnmarshalNestedObject( wireFormat, dataIn ) ) );
-    info->setRedeliveryCounter( dataIn->readInt() );
+    try {
+
+        BaseCommandMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+        MessageDispatch* info =
+            dynamic_cast<MessageDispatch*>( dataStructure );
+        info->setConsumerId( dynamic_cast< ConsumerId* >( 
+            looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
+        info->setDestination( dynamic_cast< ActiveMQDestination* >( 
+            looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
+        info->setMessage( dynamic_cast< Message* >( 
+            looseUnmarshalNestedObject( wireFormat, dataIn ) ) );
+        info->setRedeliveryCounter( dataIn->readInt() );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void MessageDispatchMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ) {
 
-    MessageDispatch* info =
-        dynamic_cast<MessageDispatch*>( dataStructure );
-    BaseCommandMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
-
-    looseMarshalCachedObject( wireFormat, info->getConsumerId(), dataOut );
-    looseMarshalCachedObject( wireFormat, info->getDestination(), dataOut );
-    looseMarshalNestedObject( wireFormat, info->getMessage(), dataOut );
-    dataOut->writeInt( info->getRedeliveryCounter() );
+    try {
+
+        MessageDispatch* info =
+            dynamic_cast<MessageDispatch*>( dataStructure );
+         BaseCommandMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+
+        looseMarshalCachedObject( wireFormat, info->getConsumerId(), dataOut );
+        looseMarshalCachedObject( wireFormat, info->getDestination(), dataOut );
+        looseMarshalNestedObject( wireFormat, info->getMessage(), dataOut );
+        dataOut->writeInt( info->getRedeliveryCounter() );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 



Mime
View raw message