activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r510313 [5/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/RemoveSubscriptionInfoMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/RemoveSubscriptionInfoMarshaller.cpp?view=diff&rev=510313&r1=510312&r2=510313
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/RemoveSubscriptionInfoMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/RemoveSubscriptionInfoMarshaller.cpp Wed Feb 21 15:41:51 2007
@@ -48,63 +48,93 @@
 ///////////////////////////////////////////////////////////////////////////////
 void RemoveSubscriptionInfoMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ) {
 
-    BaseCommandMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+    try {
 
-    RemoveSubscriptionInfo* info =
-        dynamic_cast<RemoveSubscriptionInfo*>( dataStructure );
-    info->setConnectionId( dynamic_cast< ConnectionId* >(
-        tightUnmarshalCachedObject( wireFormat, dataIn, bs ) ) );
-    info->setSubcriptionName( tightUnmarshalString( dataIn, bs ) );
-    info->setClientId( tightUnmarshalString( dataIn, bs ) );
+        BaseCommandMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+
+        RemoveSubscriptionInfo* info =
+            dynamic_cast<RemoveSubscriptionInfo*>( dataStructure );
+        info->setConnectionId( dynamic_cast< ConnectionId* >(
+            tightUnmarshalCachedObject( wireFormat, dataIn, bs ) ) );
+        info->setSubcriptionName( tightUnmarshalString( dataIn, bs ) );
+        info->setClientId( tightUnmarshalString( dataIn, bs ) );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 int RemoveSubscriptionInfoMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ) {
 
-    RemoveSubscriptionInfo* info =
-        dynamic_cast<RemoveSubscriptionInfo*>( dataStructure );
+    try {
 
-    int rc = BaseCommandMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
-    rc += tightMarshalCachedObject1( wireFormat, info->getConnectionId(), bs );
-    rc += tightMarshalString1( info->getSubcriptionName(), bs );
-    rc += tightMarshalString1( info->getClientId(), bs );
+        RemoveSubscriptionInfo* info =
+            dynamic_cast<RemoveSubscriptionInfo*>( dataStructure );
 
-    return rc + 0;
+        int rc = BaseCommandMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
+        rc += tightMarshalCachedObject1( wireFormat, info->getConnectionId(), bs );
+        rc += tightMarshalString1( info->getSubcriptionName(), bs );
+        rc += tightMarshalString1( info->getClientId(), bs );
+
+        return rc + 0;
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void RemoveSubscriptionInfoMarshaller::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 );
 
-    RemoveSubscriptionInfo* info =
-        dynamic_cast<RemoveSubscriptionInfo*>( dataStructure );
-    tightMarshalCachedObject2( wireFormat, info->getConnectionId(), dataOut, bs );
-    tightMarshalString2( info->getSubcriptionName(), dataOut, bs );
-    tightMarshalString2( info->getClientId(), dataOut, bs );
+        RemoveSubscriptionInfo* info =
+            dynamic_cast<RemoveSubscriptionInfo*>( dataStructure );
+        tightMarshalCachedObject2( wireFormat, info->getConnectionId(), dataOut, bs );
+        tightMarshalString2( info->getSubcriptionName(), dataOut, bs );
+        tightMarshalString2( info->getClientId(), dataOut, bs );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void RemoveSubscriptionInfoMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ) {
 
-    BaseCommandMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
-    RemoveSubscriptionInfo* info =
-        dynamic_cast<RemoveSubscriptionInfo*>( dataStructure );
-    info->setConnectionId( dynamic_cast< ConnectionId* >( 
-        looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
-    info->setSubcriptionName( looseUnmarshalString( dataIn ) );
-    info->setClientId( looseUnmarshalString( dataIn ) );
+    try {
+
+        BaseCommandMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+        RemoveSubscriptionInfo* info =
+            dynamic_cast<RemoveSubscriptionInfo*>( dataStructure );
+        info->setConnectionId( dynamic_cast< ConnectionId* >( 
+            looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
+        info->setSubcriptionName( looseUnmarshalString( dataIn ) );
+        info->setClientId( looseUnmarshalString( dataIn ) );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void RemoveSubscriptionInfoMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ) {
 
-    RemoveSubscriptionInfo* info =
-        dynamic_cast<RemoveSubscriptionInfo*>( dataStructure );
-    BaseCommandMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
-
-    looseMarshalCachedObject( wireFormat, info->getConnectionId(), dataOut );
-    looseMarshalString( info->getSubcriptionName(), dataOut );
-    looseMarshalString( info->getClientId(), dataOut );
+    try {
+
+        RemoveSubscriptionInfo* info =
+            dynamic_cast<RemoveSubscriptionInfo*>( dataStructure );
+         BaseCommandMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+
+        looseMarshalCachedObject( wireFormat, info->getConnectionId(), dataOut );
+        looseMarshalString( info->getSubcriptionName(), dataOut );
+        looseMarshalString( info->getClientId(), 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/ReplayCommandMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ReplayCommandMarshaller.cpp?view=diff&rev=510313&r1=510312&r2=510313
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ReplayCommandMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ReplayCommandMarshaller.cpp Wed Feb 21 15:41:51 2007
@@ -48,51 +48,81 @@
 ///////////////////////////////////////////////////////////////////////////////
 void ReplayCommandMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ) {
 
-    BaseCommandMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+    try {
 
-    ReplayCommand* info =
-        dynamic_cast<ReplayCommand*>( dataStructure );
-    info->setFirstNakNumber( dataIn->readInt() );
-    info->setLastNakNumber( dataIn->readInt() );
+        BaseCommandMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+
+        ReplayCommand* info =
+            dynamic_cast<ReplayCommand*>( dataStructure );
+        info->setFirstNakNumber( dataIn->readInt() );
+        info->setLastNakNumber( dataIn->readInt() );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 int ReplayCommandMarshaller::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 + 8;
+        return rc + 8;
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void ReplayCommandMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ) {
 
-    BaseCommandMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+    try {
 
-    ReplayCommand* info =
-        dynamic_cast<ReplayCommand*>( dataStructure );
-    dataOut->writeInt( info->getFirstNakNumber() );
-    dataOut->writeInt( info->getLastNakNumber() );
+        BaseCommandMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+
+        ReplayCommand* info =
+            dynamic_cast<ReplayCommand*>( dataStructure );
+        dataOut->writeInt( info->getFirstNakNumber() );
+        dataOut->writeInt( info->getLastNakNumber() );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void ReplayCommandMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ) {
 
-    BaseCommandMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
-    ReplayCommand* info =
-        dynamic_cast<ReplayCommand*>( dataStructure );
-    info->setFirstNakNumber( dataIn->readInt() );
-    info->setLastNakNumber( dataIn->readInt() );
+    try {
+
+        BaseCommandMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+        ReplayCommand* info =
+            dynamic_cast<ReplayCommand*>( dataStructure );
+        info->setFirstNakNumber( dataIn->readInt() );
+        info->setLastNakNumber( dataIn->readInt() );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void ReplayCommandMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ) {
 
-    ReplayCommand* info =
-        dynamic_cast<ReplayCommand*>( dataStructure );
-    BaseCommandMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+    try {
 
-    dataOut->writeInt( info->getFirstNakNumber() );
-    dataOut->writeInt( info->getLastNakNumber() );
+        ReplayCommand* info =
+            dynamic_cast<ReplayCommand*>( dataStructure );
+         BaseCommandMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+
+        dataOut->writeInt( info->getFirstNakNumber() );
+        dataOut->writeInt( info->getLastNakNumber() );
+    }
+    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/ResponseMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ResponseMarshaller.cpp?view=diff&rev=510313&r1=510312&r2=510313
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ResponseMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ResponseMarshaller.cpp Wed Feb 21 15:41:51 2007
@@ -48,47 +48,77 @@
 ///////////////////////////////////////////////////////////////////////////////
 void ResponseMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ) {
 
-    BaseCommandMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+    try {
 
-    Response* info =
-        dynamic_cast<Response*>( dataStructure );
-    info->setCorrelationId( dataIn->readInt() );
+        BaseCommandMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+
+        Response* info =
+            dynamic_cast<Response*>( dataStructure );
+        info->setCorrelationId( dataIn->readInt() );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 int ResponseMarshaller::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 + 4;
+        return rc + 4;
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void ResponseMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ) {
 
-    BaseCommandMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+    try {
 
-    Response* info =
-        dynamic_cast<Response*>( dataStructure );
-    dataOut->writeInt( info->getCorrelationId() );
+        BaseCommandMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+
+        Response* info =
+            dynamic_cast<Response*>( dataStructure );
+        dataOut->writeInt( info->getCorrelationId() );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void ResponseMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ) {
 
-    BaseCommandMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
-    Response* info =
-        dynamic_cast<Response*>( dataStructure );
-    info->setCorrelationId( dataIn->readInt() );
+    try {
+
+        BaseCommandMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+        Response* info =
+            dynamic_cast<Response*>( dataStructure );
+        info->setCorrelationId( dataIn->readInt() );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void ResponseMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ) {
 
-    Response* info =
-        dynamic_cast<Response*>( dataStructure );
-    BaseCommandMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+    try {
 
-    dataOut->writeInt( info->getCorrelationId() );
+        Response* info =
+            dynamic_cast<Response*>( dataStructure );
+         BaseCommandMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+
+        dataOut->writeInt( info->getCorrelationId() );
+    }
+    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/SessionIdMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/SessionIdMarshaller.cpp?view=diff&rev=510313&r1=510312&r2=510313
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/SessionIdMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/SessionIdMarshaller.cpp Wed Feb 21 15:41:51 2007
@@ -48,56 +48,86 @@
 ///////////////////////////////////////////////////////////////////////////////
 void SessionIdMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ) {
 
-    BaseDataStreamMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+    try {
 
-    SessionId* info =
-        dynamic_cast<SessionId*>( dataStructure );
-    info->setConnectionId( tightUnmarshalString( dataIn, bs ) );
-    info->setValue( tightUnmarshalLong( wireFormat, dataIn, bs ) );
+        BaseDataStreamMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+
+        SessionId* info =
+            dynamic_cast<SessionId*>( dataStructure );
+        info->setConnectionId( tightUnmarshalString( dataIn, bs ) );
+        info->setValue( tightUnmarshalLong( wireFormat, dataIn, bs ) );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 int SessionIdMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ) {
 
-    SessionId* info =
-        dynamic_cast<SessionId*>( dataStructure );
+    try {
 
-    int rc = BaseDataStreamMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
-    rc += tightMarshalString1( info->getConnectionId(), bs );
-    rc += tightMarshalLong1( wireFormat, info->getValue(), bs );
+        SessionId* info =
+            dynamic_cast<SessionId*>( dataStructure );
 
-    return rc + 0;
+        int rc = BaseDataStreamMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
+        rc += tightMarshalString1( info->getConnectionId(), bs );
+        rc += tightMarshalLong1( wireFormat, info->getValue(), bs );
+
+        return rc + 0;
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void SessionIdMarshaller::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 );
 
-    SessionId* info =
-        dynamic_cast<SessionId*>( dataStructure );
-    tightMarshalString2( info->getConnectionId(), dataOut, bs );
-    tightMarshalLong2( wireFormat, info->getValue(), dataOut, bs );
+        SessionId* info =
+            dynamic_cast<SessionId*>( dataStructure );
+        tightMarshalString2( info->getConnectionId(), dataOut, bs );
+        tightMarshalLong2( wireFormat, info->getValue(), dataOut, bs );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void SessionIdMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ) {
 
-    BaseDataStreamMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
-    SessionId* info =
-        dynamic_cast<SessionId*>( dataStructure );
-    info->setConnectionId( looseUnmarshalString( dataIn ) );
-    info->setValue( looseUnmarshalLong( wireFormat, dataIn ) );
+    try {
+
+        BaseDataStreamMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+        SessionId* info =
+            dynamic_cast<SessionId*>( dataStructure );
+        info->setConnectionId( looseUnmarshalString( dataIn ) );
+        info->setValue( looseUnmarshalLong( wireFormat, dataIn ) );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void SessionIdMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ) {
 
-    SessionId* info =
-        dynamic_cast<SessionId*>( dataStructure );
-    BaseDataStreamMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+    try {
 
-    looseMarshalString( info->getConnectionId(), dataOut );
-    looseMarshalLong( wireFormat, info->getValue(), dataOut );
+        SessionId* info =
+            dynamic_cast<SessionId*>( dataStructure );
+         BaseDataStreamMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+
+        looseMarshalString( info->getConnectionId(), dataOut );
+        looseMarshalLong( wireFormat, info->getValue(), 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/SessionInfoMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/SessionInfoMarshaller.cpp?view=diff&rev=510313&r1=510312&r2=510313
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/SessionInfoMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/SessionInfoMarshaller.cpp Wed Feb 21 15:41:51 2007
@@ -48,53 +48,83 @@
 ///////////////////////////////////////////////////////////////////////////////
 void SessionInfoMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ) {
 
-    BaseCommandMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+    try {
 
-    SessionInfo* info =
-        dynamic_cast<SessionInfo*>( dataStructure );
-    info->setSessionId( dynamic_cast< SessionId* >(
-        tightUnmarshalCachedObject( wireFormat, dataIn, bs ) ) );
+        BaseCommandMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+
+        SessionInfo* info =
+            dynamic_cast<SessionInfo*>( dataStructure );
+        info->setSessionId( dynamic_cast< SessionId* >(
+            tightUnmarshalCachedObject( wireFormat, dataIn, bs ) ) );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 int SessionInfoMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ) {
 
-    SessionInfo* info =
-        dynamic_cast<SessionInfo*>( dataStructure );
+    try {
+
+        SessionInfo* info =
+            dynamic_cast<SessionInfo*>( dataStructure );
 
-    int rc = BaseCommandMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
-    rc += tightMarshalCachedObject1( wireFormat, info->getSessionId(), bs );
+        int rc = BaseCommandMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
+        rc += tightMarshalCachedObject1( wireFormat, info->getSessionId(), 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 SessionInfoMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ) {
 
-    BaseCommandMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+    try {
 
-    SessionInfo* info =
-        dynamic_cast<SessionInfo*>( dataStructure );
-    tightMarshalCachedObject2( wireFormat, info->getSessionId(), dataOut, bs );
+        BaseCommandMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+
+        SessionInfo* info =
+            dynamic_cast<SessionInfo*>( dataStructure );
+        tightMarshalCachedObject2( wireFormat, info->getSessionId(), dataOut, bs );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void SessionInfoMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ) {
 
-    BaseCommandMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
-    SessionInfo* info =
-        dynamic_cast<SessionInfo*>( dataStructure );
-    info->setSessionId( dynamic_cast< SessionId* >( 
-        looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
+    try {
+
+        BaseCommandMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+        SessionInfo* info =
+            dynamic_cast<SessionInfo*>( dataStructure );
+        info->setSessionId( dynamic_cast< SessionId* >( 
+            looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void SessionInfoMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ) {
 
-    SessionInfo* info =
-        dynamic_cast<SessionInfo*>( dataStructure );
-    BaseCommandMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+    try {
 
-    looseMarshalCachedObject( wireFormat, info->getSessionId(), dataOut );
+        SessionInfo* info =
+            dynamic_cast<SessionInfo*>( dataStructure );
+         BaseCommandMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+
+        looseMarshalCachedObject( wireFormat, info->getSessionId(), 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/ShutdownInfoMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ShutdownInfoMarshaller.cpp?view=diff&rev=510313&r1=510312&r2=510313
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ShutdownInfoMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ShutdownInfoMarshaller.cpp Wed Feb 21 15:41:51 2007
@@ -48,35 +48,65 @@
 ///////////////////////////////////////////////////////////////////////////////
 void ShutdownInfoMarshaller::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 ShutdownInfoMarshaller::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 ShutdownInfoMarshaller::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 ShutdownInfoMarshaller::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 ShutdownInfoMarshaller::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/SubscriptionInfoMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/SubscriptionInfoMarshaller.cpp?view=diff&rev=510313&r1=510312&r2=510313
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/SubscriptionInfoMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/SubscriptionInfoMarshaller.cpp Wed Feb 21 15:41:51 2007
@@ -48,68 +48,98 @@
 ///////////////////////////////////////////////////////////////////////////////
 void SubscriptionInfoMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ) {
 
-    BaseDataStreamMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+    try {
 
-    SubscriptionInfo* info =
-        dynamic_cast<SubscriptionInfo*>( dataStructure );
-    info->setClientId( tightUnmarshalString( dataIn, bs ) );
-    info->setDestination( dynamic_cast< ActiveMQDestination* >(
-        tightUnmarshalCachedObject( wireFormat, dataIn, bs ) ) );
-    info->setSelector( tightUnmarshalString( dataIn, bs ) );
-    info->setSubcriptionName( tightUnmarshalString( dataIn, bs ) );
+        BaseDataStreamMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+
+        SubscriptionInfo* info =
+            dynamic_cast<SubscriptionInfo*>( dataStructure );
+        info->setClientId( tightUnmarshalString( dataIn, bs ) );
+        info->setDestination( dynamic_cast< ActiveMQDestination* >(
+            tightUnmarshalCachedObject( wireFormat, dataIn, bs ) ) );
+        info->setSelector( tightUnmarshalString( dataIn, bs ) );
+        info->setSubcriptionName( tightUnmarshalString( dataIn, bs ) );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 int SubscriptionInfoMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ) {
 
-    SubscriptionInfo* info =
-        dynamic_cast<SubscriptionInfo*>( dataStructure );
+    try {
 
-    int rc = BaseDataStreamMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
-    rc += tightMarshalString1( info->getClientId(), bs );
-    rc += tightMarshalCachedObject1( wireFormat, info->getDestination(), bs );
-    rc += tightMarshalString1( info->getSelector(), bs );
-    rc += tightMarshalString1( info->getSubcriptionName(), bs );
+        SubscriptionInfo* info =
+            dynamic_cast<SubscriptionInfo*>( dataStructure );
 
-    return rc + 0;
+        int rc = BaseDataStreamMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
+        rc += tightMarshalString1( info->getClientId(), bs );
+        rc += tightMarshalCachedObject1( wireFormat, info->getDestination(), bs );
+        rc += tightMarshalString1( info->getSelector(), bs );
+        rc += tightMarshalString1( info->getSubcriptionName(), bs );
+
+        return rc + 0;
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void SubscriptionInfoMarshaller::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 );
 
-    SubscriptionInfo* info =
-        dynamic_cast<SubscriptionInfo*>( dataStructure );
-    tightMarshalString2( info->getClientId(), dataOut, bs );
-    tightMarshalCachedObject2( wireFormat, info->getDestination(), dataOut, bs );
-    tightMarshalString2( info->getSelector(), dataOut, bs );
-    tightMarshalString2( info->getSubcriptionName(), dataOut, bs );
+        SubscriptionInfo* info =
+            dynamic_cast<SubscriptionInfo*>( dataStructure );
+        tightMarshalString2( info->getClientId(), dataOut, bs );
+        tightMarshalCachedObject2( wireFormat, info->getDestination(), dataOut, bs );
+        tightMarshalString2( info->getSelector(), dataOut, bs );
+        tightMarshalString2( info->getSubcriptionName(), dataOut, bs );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void SubscriptionInfoMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ) {
 
-    BaseDataStreamMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
-    SubscriptionInfo* info =
-        dynamic_cast<SubscriptionInfo*>( dataStructure );
-    info->setClientId( looseUnmarshalString( dataIn ) );
-    info->setDestination( dynamic_cast< ActiveMQDestination* >( 
-        looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
-    info->setSelector( looseUnmarshalString( dataIn ) );
-    info->setSubcriptionName( looseUnmarshalString( dataIn ) );
+    try {
+
+        BaseDataStreamMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+        SubscriptionInfo* info =
+            dynamic_cast<SubscriptionInfo*>( dataStructure );
+        info->setClientId( looseUnmarshalString( dataIn ) );
+        info->setDestination( dynamic_cast< ActiveMQDestination* >( 
+            looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
+        info->setSelector( looseUnmarshalString( dataIn ) );
+        info->setSubcriptionName( looseUnmarshalString( dataIn ) );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void SubscriptionInfoMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ) {
 
-    SubscriptionInfo* info =
-        dynamic_cast<SubscriptionInfo*>( dataStructure );
-    BaseDataStreamMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
-
-    looseMarshalString( info->getClientId(), dataOut );
-    looseMarshalCachedObject( wireFormat, info->getDestination(), dataOut );
-    looseMarshalString( info->getSelector(), dataOut );
-    looseMarshalString( info->getSubcriptionName(), dataOut );
+    try {
+
+        SubscriptionInfo* info =
+            dynamic_cast<SubscriptionInfo*>( dataStructure );
+         BaseDataStreamMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+
+        looseMarshalString( info->getClientId(), dataOut );
+        looseMarshalCachedObject( wireFormat, info->getDestination(), dataOut );
+        looseMarshalString( info->getSelector(), dataOut );
+        looseMarshalString( info->getSubcriptionName(), 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/TransactionIdMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/TransactionIdMarshaller.cpp?view=diff&rev=510313&r1=510312&r2=510313
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/TransactionIdMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/TransactionIdMarshaller.cpp Wed Feb 21 15:41:51 2007
@@ -38,35 +38,65 @@
 ///////////////////////////////////////////////////////////////////////////////
 void TransactionIdMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ) {
 
-    BaseDataStreamMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+    try {
 
+        BaseDataStreamMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 int TransactionIdMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ) {
 
-    int rc = BaseDataStreamMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
+    try {
+
+        int rc = BaseDataStreamMarshaller::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 TransactionIdMarshaller::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 );
 
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void TransactionIdMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ) {
 
-    BaseDataStreamMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+    try {
+
+        BaseDataStreamMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void TransactionIdMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ) {
 
-    BaseDataStreamMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+    try {
+
+         BaseDataStreamMarshaller::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/TransactionInfoMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/TransactionInfoMarshaller.cpp?view=diff&rev=510313&r1=510312&r2=510313
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/TransactionInfoMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/TransactionInfoMarshaller.cpp Wed Feb 21 15:41:51 2007
@@ -48,64 +48,94 @@
 ///////////////////////////////////////////////////////////////////////////////
 void TransactionInfoMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ) {
 
-    BaseCommandMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+    try {
 
-    TransactionInfo* info =
-        dynamic_cast<TransactionInfo*>( dataStructure );
-    info->setConnectionId( dynamic_cast< ConnectionId* >(
-        tightUnmarshalCachedObject( wireFormat, dataIn, bs ) ) );
-    info->setTransactionId( dynamic_cast< TransactionId* >(
-        tightUnmarshalCachedObject( wireFormat, dataIn, bs ) ) );
-    info->setType( dataIn->readByte() );
+        BaseCommandMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+
+        TransactionInfo* info =
+            dynamic_cast<TransactionInfo*>( dataStructure );
+        info->setConnectionId( dynamic_cast< ConnectionId* >(
+            tightUnmarshalCachedObject( wireFormat, dataIn, bs ) ) );
+        info->setTransactionId( dynamic_cast< TransactionId* >(
+            tightUnmarshalCachedObject( wireFormat, dataIn, bs ) ) );
+        info->setType( dataIn->readByte() );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 int TransactionInfoMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ) {
 
-    TransactionInfo* info =
-        dynamic_cast<TransactionInfo*>( dataStructure );
+    try {
 
-    int rc = BaseCommandMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
-    rc += tightMarshalCachedObject1( wireFormat, info->getConnectionId(), bs );
-    rc += tightMarshalCachedObject1( wireFormat, info->getTransactionId(), bs );
+        TransactionInfo* info =
+            dynamic_cast<TransactionInfo*>( dataStructure );
 
-    return rc + 1;
+        int rc = BaseCommandMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
+        rc += tightMarshalCachedObject1( wireFormat, info->getConnectionId(), bs );
+        rc += tightMarshalCachedObject1( wireFormat, info->getTransactionId(), bs );
+
+        return rc + 1;
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void TransactionInfoMarshaller::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 );
 
-    TransactionInfo* info =
-        dynamic_cast<TransactionInfo*>( dataStructure );
-    tightMarshalCachedObject2( wireFormat, info->getConnectionId(), dataOut, bs );
-    tightMarshalCachedObject2( wireFormat, info->getTransactionId(), dataOut, bs );
-    dataOut->write( info->getType() );
+        TransactionInfo* info =
+            dynamic_cast<TransactionInfo*>( dataStructure );
+        tightMarshalCachedObject2( wireFormat, info->getConnectionId(), dataOut, bs );
+        tightMarshalCachedObject2( wireFormat, info->getTransactionId(), dataOut, bs );
+        dataOut->write( info->getType() );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void TransactionInfoMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ) {
 
-    BaseCommandMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
-    TransactionInfo* info =
-        dynamic_cast<TransactionInfo*>( dataStructure );
-    info->setConnectionId( dynamic_cast< ConnectionId* >( 
-        looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
-    info->setTransactionId( dynamic_cast< TransactionId* >( 
-        looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
-    info->setType( dataIn->readByte() );
+    try {
+
+        BaseCommandMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+        TransactionInfo* info =
+            dynamic_cast<TransactionInfo*>( dataStructure );
+        info->setConnectionId( dynamic_cast< ConnectionId* >( 
+            looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
+        info->setTransactionId( dynamic_cast< TransactionId* >( 
+            looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
+        info->setType( dataIn->readByte() );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void TransactionInfoMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ) {
 
-    TransactionInfo* info =
-        dynamic_cast<TransactionInfo*>( dataStructure );
-    BaseCommandMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
-
-    looseMarshalCachedObject( wireFormat, info->getConnectionId(), dataOut );
-    looseMarshalCachedObject( wireFormat, info->getTransactionId(), dataOut );
-    dataOut->write( info->getType() );
+    try {
+
+        TransactionInfo* info =
+            dynamic_cast<TransactionInfo*>( dataStructure );
+         BaseCommandMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+
+        looseMarshalCachedObject( wireFormat, info->getConnectionId(), dataOut );
+        looseMarshalCachedObject( wireFormat, info->getTransactionId(), dataOut );
+        dataOut->write( info->getType() );
+    }
+    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/WireFormatInfoMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/WireFormatInfoMarshaller.cpp?view=diff&rev=510313&r1=510312&r2=510313
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/WireFormatInfoMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/WireFormatInfoMarshaller.cpp Wed Feb 21 15:41:51 2007
@@ -48,77 +48,107 @@
 ///////////////////////////////////////////////////////////////////////////////
 void WireFormatInfoMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ) {
 
-    BaseDataStreamMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+    try {
 
-    WireFormatInfo* info =
-        dynamic_cast<WireFormatInfo*>( dataStructure );
-    info->beforeUnmarshal( wireFormat );
+        BaseDataStreamMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
 
-    info->setMagic( tightUnmarshalConstByteArray( dataIn, bs, 8 ) );
-    info->setVersion( dataIn->readInt() );
-    info->setMarshalledProperties( tightUnmarshalByteArray( dataIn, bs ) );
+        WireFormatInfo* info =
+            dynamic_cast<WireFormatInfo*>( dataStructure );
+        info->beforeUnmarshal( wireFormat );
 
-    info->afterUnmarshal( wireFormat );
+        info->setMagic( tightUnmarshalConstByteArray( dataIn, bs, 8 ) );
+        info->setVersion( dataIn->readInt() );
+        info->setMarshalledProperties( tightUnmarshalByteArray( dataIn, bs ) );
+
+        info->afterUnmarshal( wireFormat );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 int WireFormatInfoMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ) {
 
-    WireFormatInfo* info =
-        dynamic_cast<WireFormatInfo*>( dataStructure );
+    try {
 
-    info->beforeMarshal( wireFormat );
-    int rc = BaseDataStreamMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
-    bs->writeBoolean( info->getMarshalledProperties().size() != 0 );
-    rc += info->getMarshalledProperties().size() == 0 ? 0 : (int)info->getMarshalledProperties().size() + 4;
+        WireFormatInfo* info =
+            dynamic_cast<WireFormatInfo*>( dataStructure );
 
-    return rc + 12;
+        info->beforeMarshal( wireFormat );
+        int rc = BaseDataStreamMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
+        bs->writeBoolean( info->getMarshalledProperties().size() != 0 );
+        rc += info->getMarshalledProperties().size() == 0 ? 0 : (int)info->getMarshalledProperties().size() + 4;
+
+        return rc + 12;
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void WireFormatInfoMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ) {
 
-    BaseDataStreamMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+    try {
 
-    WireFormatInfo* info =
-        dynamic_cast<WireFormatInfo*>( dataStructure );
-    dataOut->write( (const unsigned char*)(&info->getMagic()[0]), 8 );
-    dataOut->writeInt( info->getVersion() );
-    if( bs->readBoolean() ) {
-        dataOut->writeInt( (int)info->getMarshalledProperties().size() );
-        dataOut->write( (const unsigned char*)(&info->getMarshalledProperties()[0]), (int)info->getMarshalledProperties().size() );
+        BaseDataStreamMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+
+        WireFormatInfo* info =
+            dynamic_cast<WireFormatInfo*>( dataStructure );
+        dataOut->write( (const unsigned char*)(&info->getMagic()[0]), 8 );
+        dataOut->writeInt( info->getVersion() );
+        if( bs->readBoolean() ) {
+            dataOut->writeInt( (int)info->getMarshalledProperties().size() );
+            dataOut->write( (const unsigned char*)(&info->getMarshalledProperties()[0]), (int)info->getMarshalledProperties().size() );
+        }
+        info->afterMarshal( wireFormat );
     }
-    info->afterMarshal( wireFormat );
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void WireFormatInfoMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ) {
 
-    BaseDataStreamMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
-    WireFormatInfo* info =
-        dynamic_cast<WireFormatInfo*>( dataStructure );
-    info->beforeUnmarshal( wireFormat );
-    info->setMagic( looseUnmarshalConstByteArray( dataIn, 8 ) );
-    info->setVersion( dataIn->readInt() );
-    info->setMarshalledProperties( looseUnmarshalByteArray( dataIn ) );
-    info->afterUnmarshal( wireFormat );
+    try {
+
+        BaseDataStreamMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+        WireFormatInfo* info =
+            dynamic_cast<WireFormatInfo*>( dataStructure );
+        info->beforeUnmarshal( wireFormat );
+        info->setMagic( looseUnmarshalConstByteArray( dataIn, 8 ) );
+        info->setVersion( dataIn->readInt() );
+        info->setMarshalledProperties( looseUnmarshalByteArray( dataIn ) );
+        info->afterUnmarshal( wireFormat );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void WireFormatInfoMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ) {
 
-    WireFormatInfo* info =
-        dynamic_cast<WireFormatInfo*>( dataStructure );
-    info->beforeMarshal( wireFormat );
-    BaseDataStreamMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
-
-    dataOut->write( (const unsigned char*)(&info->getMagic()[0]), (int)8 );
-    dataOut->writeInt( info->getVersion() );
-    dataOut->write( info->getMarshalledProperties().size() != 0 );
-    if( info->getMarshalledProperties().size() != 0 ) {
-        dataOut->writeInt( (int)info->getMarshalledProperties().size() );
-        dataOut->write( (const unsigned char*)(&info->getMarshalledProperties()[0]), (int)info->getMarshalledProperties().size() );
+    try {
+
+        WireFormatInfo* info =
+            dynamic_cast<WireFormatInfo*>( dataStructure );
+        info->beforeMarshal( wireFormat );
+         BaseDataStreamMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+
+        dataOut->write( (const unsigned char*)(&info->getMagic()[0]), (int)8 );
+        dataOut->writeInt( info->getVersion() );
+        dataOut->write( info->getMarshalledProperties().size() != 0 );
+        if( info->getMarshalledProperties().size() != 0 ) {
+            dataOut->writeInt( (int)info->getMarshalledProperties().size() );
+            dataOut->write( (const unsigned char*)(&info->getMarshalledProperties()[0]), (int)info->getMarshalledProperties().size() );
+        }
+        info->afterMarshal( wireFormat );
     }
-    info->afterMarshal( wireFormat );
+    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/XATransactionIdMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/XATransactionIdMarshaller.cpp?view=diff&rev=510313&r1=510312&r2=510313
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/XATransactionIdMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/XATransactionIdMarshaller.cpp Wed Feb 21 15:41:51 2007
@@ -48,76 +48,106 @@
 ///////////////////////////////////////////////////////////////////////////////
 void XATransactionIdMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ) {
 
-    TransactionIdMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+    try {
 
-    XATransactionId* info =
-        dynamic_cast<XATransactionId*>( dataStructure );
-    info->setFormatId( dataIn->readInt() );
-    info->setGlobalTransactionId( tightUnmarshalByteArray( dataIn, bs ) );
-    info->setBranchQualifier( tightUnmarshalByteArray( dataIn, bs ) );
+        TransactionIdMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+
+        XATransactionId* info =
+            dynamic_cast<XATransactionId*>( dataStructure );
+        info->setFormatId( dataIn->readInt() );
+        info->setGlobalTransactionId( tightUnmarshalByteArray( dataIn, bs ) );
+        info->setBranchQualifier( tightUnmarshalByteArray( dataIn, bs ) );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 int XATransactionIdMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ) {
 
-    XATransactionId* info =
-        dynamic_cast<XATransactionId*>( dataStructure );
+    try {
+
+        XATransactionId* info =
+            dynamic_cast<XATransactionId*>( dataStructure );
 
-    int rc = TransactionIdMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
-    bs->writeBoolean( info->getGlobalTransactionId().size() != 0 );
-    rc += info->getGlobalTransactionId().size() == 0 ? 0 : (int)info->getGlobalTransactionId().size() + 4;
-    bs->writeBoolean( info->getBranchQualifier().size() != 0 );
-    rc += info->getBranchQualifier().size() == 0 ? 0 : (int)info->getBranchQualifier().size() + 4;
+        int rc = TransactionIdMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
+        bs->writeBoolean( info->getGlobalTransactionId().size() != 0 );
+        rc += info->getGlobalTransactionId().size() == 0 ? 0 : (int)info->getGlobalTransactionId().size() + 4;
+        bs->writeBoolean( info->getBranchQualifier().size() != 0 );
+        rc += info->getBranchQualifier().size() == 0 ? 0 : (int)info->getBranchQualifier().size() + 4;
 
-    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 XATransactionIdMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ) {
 
-    TransactionIdMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+    try {
 
-    XATransactionId* info =
-        dynamic_cast<XATransactionId*>( dataStructure );
-    dataOut->writeInt( info->getFormatId() );
-    if( bs->readBoolean() ) {
-        dataOut->writeInt( (int)info->getGlobalTransactionId().size() );
-        dataOut->write( (const unsigned char*)(&info->getGlobalTransactionId()[0]), (int)info->getGlobalTransactionId().size() );
-    }
-    if( bs->readBoolean() ) {
-        dataOut->writeInt( (int)info->getBranchQualifier().size() );
-        dataOut->write( (const unsigned char*)(&info->getBranchQualifier()[0]), (int)info->getBranchQualifier().size() );
+        TransactionIdMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+
+        XATransactionId* info =
+            dynamic_cast<XATransactionId*>( dataStructure );
+        dataOut->writeInt( info->getFormatId() );
+        if( bs->readBoolean() ) {
+            dataOut->writeInt( (int)info->getGlobalTransactionId().size() );
+            dataOut->write( (const unsigned char*)(&info->getGlobalTransactionId()[0]), (int)info->getGlobalTransactionId().size() );
+        }
+        if( bs->readBoolean() ) {
+            dataOut->writeInt( (int)info->getBranchQualifier().size() );
+            dataOut->write( (const unsigned char*)(&info->getBranchQualifier()[0]), (int)info->getBranchQualifier().size() );
+        }
     }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void XATransactionIdMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ) {
 
-    TransactionIdMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
-    XATransactionId* info =
-        dynamic_cast<XATransactionId*>( dataStructure );
-    info->setFormatId( dataIn->readInt() );
-    info->setGlobalTransactionId( looseUnmarshalByteArray( dataIn ) );
-    info->setBranchQualifier( looseUnmarshalByteArray( dataIn ) );
+    try {
+
+        TransactionIdMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+        XATransactionId* info =
+            dynamic_cast<XATransactionId*>( dataStructure );
+        info->setFormatId( dataIn->readInt() );
+        info->setGlobalTransactionId( looseUnmarshalByteArray( dataIn ) );
+        info->setBranchQualifier( looseUnmarshalByteArray( dataIn ) );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void XATransactionIdMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ) {
 
-    XATransactionId* info =
-        dynamic_cast<XATransactionId*>( dataStructure );
-    TransactionIdMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
-
-    dataOut->writeInt( info->getFormatId() );
-    dataOut->write( info->getGlobalTransactionId().size() != 0 );
-    if( info->getGlobalTransactionId().size() != 0 ) {
-        dataOut->writeInt( (int)info->getGlobalTransactionId().size() );
-        dataOut->write( (const unsigned char*)(&info->getGlobalTransactionId()[0]), (int)info->getGlobalTransactionId().size() );
-    }
-    dataOut->write( info->getBranchQualifier().size() != 0 );
-    if( info->getBranchQualifier().size() != 0 ) {
-        dataOut->writeInt( (int)info->getBranchQualifier().size() );
-        dataOut->write( (const unsigned char*)(&info->getBranchQualifier()[0]), (int)info->getBranchQualifier().size() );
+    try {
+
+        XATransactionId* info =
+            dynamic_cast<XATransactionId*>( dataStructure );
+         TransactionIdMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+
+        dataOut->writeInt( info->getFormatId() );
+        dataOut->write( info->getGlobalTransactionId().size() != 0 );
+        if( info->getGlobalTransactionId().size() != 0 ) {
+            dataOut->writeInt( (int)info->getGlobalTransactionId().size() );
+            dataOut->write( (const unsigned char*)(&info->getGlobalTransactionId()[0]), (int)info->getGlobalTransactionId().size() );
+        }
+        dataOut->write( info->getBranchQualifier().size() != 0 );
+        if( info->getBranchQualifier().size() != 0 ) {
+            dataOut->writeInt( (int)info->getBranchQualifier().size() );
+            dataOut->write( (const unsigned char*)(&info->getBranchQualifier()[0]), (int)info->getBranchQualifier().size() );
+        }
     }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 



Mime
View raw message