You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2007/02/22 00:41:54 UTC
svn commit: r510313 [1/5] -
/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/
Author: tabish
Date: Wed Feb 21 15:41:51 2007
New Revision: 510313
URL: http://svn.apache.org/viewvc?view=rev&rev=510313
Log:
http://issues.apache.org/activemq/browse/AMQCPP-30
Added Exception Handlers
Modified:
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQBytesMessageMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQDestinationMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQMapMessageMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQMessageMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQObjectMessageMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQQueueMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQStreamMessageMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQTempDestinationMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQTempQueueMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQTempTopicMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQTextMessageMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQTopicMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/BaseCommandMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/BrokerIdMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/BrokerInfoMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ConnectionControlMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ConnectionErrorMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ConnectionIdMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ConnectionInfoMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ConsumerControlMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ConsumerIdMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ConsumerInfoMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ControlCommandMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/DataArrayResponseMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/DataResponseMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/DestinationInfoMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/DiscoveryEventMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ExceptionResponseMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/FlushCommandMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/IntegerResponseMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/JournalQueueAckMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/JournalTopicAckMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/JournalTraceMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/JournalTransactionMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/KeepAliveInfoMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/LastPartialCommandMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/LocalTransactionIdMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessageAckMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessageDispatchMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessageDispatchNotificationMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessageIdMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessageMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessagePullMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/NetworkBridgeFilterMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/PartialCommandMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ProducerIdMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ProducerInfoMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/RemoveInfoMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/RemoveSubscriptionInfoMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ReplayCommandMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ResponseMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/SessionIdMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/SessionInfoMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ShutdownInfoMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/SubscriptionInfoMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/TransactionIdMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/TransactionInfoMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/WireFormatInfoMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/XATransactionIdMarshaller.cpp
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQBytesMessageMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQBytesMessageMarshaller.cpp?view=diff&rev=510313&r1=510312&r2=510313
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQBytesMessageMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQBytesMessageMarshaller.cpp Wed Feb 21 15:41:51 2007
@@ -48,56 +48,86 @@
///////////////////////////////////////////////////////////////////////////////
void ActiveMQBytesMessageMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ) {
- MessageMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+ try {
- ActiveMQBytesMessage* info =
- dynamic_cast<ActiveMQBytesMessage*>( dataStructure );
- info->beforeUnmarshal( wireFormat );
+ MessageMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+ ActiveMQBytesMessage* info =
+ dynamic_cast<ActiveMQBytesMessage*>( dataStructure );
+ info->beforeUnmarshal( wireFormat );
- info->afterUnmarshal( wireFormat );
+
+ info->afterUnmarshal( wireFormat );
+ }
+ AMQ_CATCH_RETHROW( io::IOException )
+ AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+ AMQ_CATCHALL_THROW( io::IOException )
}
///////////////////////////////////////////////////////////////////////////////
int ActiveMQBytesMessageMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ) {
- ActiveMQBytesMessage* info =
- dynamic_cast<ActiveMQBytesMessage*>( dataStructure );
+ try {
+
+ ActiveMQBytesMessage* info =
+ dynamic_cast<ActiveMQBytesMessage*>( dataStructure );
- info->beforeMarshal( wireFormat );
- int rc = MessageMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
+ info->beforeMarshal( wireFormat );
+ int rc = MessageMarshaller::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 ActiveMQBytesMessageMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ) {
- MessageMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+ try {
- ActiveMQBytesMessage* info =
- dynamic_cast<ActiveMQBytesMessage*>( dataStructure );
- info->afterMarshal( wireFormat );
+ MessageMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+
+ ActiveMQBytesMessage* info =
+ dynamic_cast<ActiveMQBytesMessage*>( dataStructure );
+ info->afterMarshal( wireFormat );
+ }
+ AMQ_CATCH_RETHROW( io::IOException )
+ AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+ AMQ_CATCHALL_THROW( io::IOException )
}
///////////////////////////////////////////////////////////////////////////////
void ActiveMQBytesMessageMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ) {
- MessageMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
- ActiveMQBytesMessage* info =
- dynamic_cast<ActiveMQBytesMessage*>( dataStructure );
- info->beforeUnmarshal( wireFormat );
- info->afterUnmarshal( wireFormat );
+ try {
+
+ MessageMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+ ActiveMQBytesMessage* info =
+ dynamic_cast<ActiveMQBytesMessage*>( dataStructure );
+ info->beforeUnmarshal( wireFormat );
+ info->afterUnmarshal( wireFormat );
+ }
+ AMQ_CATCH_RETHROW( io::IOException )
+ AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+ AMQ_CATCHALL_THROW( io::IOException )
}
///////////////////////////////////////////////////////////////////////////////
void ActiveMQBytesMessageMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ) {
- ActiveMQBytesMessage* info =
- dynamic_cast<ActiveMQBytesMessage*>( dataStructure );
- info->beforeMarshal( wireFormat );
- MessageMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+ try {
- info->afterMarshal( wireFormat );
+ ActiveMQBytesMessage* info =
+ dynamic_cast<ActiveMQBytesMessage*>( dataStructure );
+ info->beforeMarshal( wireFormat );
+ MessageMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+
+ 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/ActiveMQDestinationMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQDestinationMarshaller.cpp?view=diff&rev=510313&r1=510312&r2=510313
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQDestinationMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQDestinationMarshaller.cpp Wed Feb 21 15:41:51 2007
@@ -38,51 +38,81 @@
///////////////////////////////////////////////////////////////////////////////
void ActiveMQDestinationMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ) {
- BaseDataStreamMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+ try {
- ActiveMQDestination* info =
- dynamic_cast<ActiveMQDestination*>( dataStructure );
- info->setPhysicalName( tightUnmarshalString( dataIn, bs ) );
+ BaseDataStreamMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+
+ ActiveMQDestination* info =
+ dynamic_cast<ActiveMQDestination*>( dataStructure );
+ info->setPhysicalName( tightUnmarshalString( dataIn, bs ) );
+ }
+ AMQ_CATCH_RETHROW( io::IOException )
+ AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+ AMQ_CATCHALL_THROW( io::IOException )
}
///////////////////////////////////////////////////////////////////////////////
int ActiveMQDestinationMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ) {
- ActiveMQDestination* info =
- dynamic_cast<ActiveMQDestination*>( dataStructure );
+ try {
+
+ ActiveMQDestination* info =
+ dynamic_cast<ActiveMQDestination*>( dataStructure );
- int rc = BaseDataStreamMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
- rc += tightMarshalString1( info->getPhysicalName(), bs );
+ int rc = BaseDataStreamMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
+ rc += tightMarshalString1( info->getPhysicalName(), 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 ActiveMQDestinationMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ) {
- BaseDataStreamMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+ try {
- ActiveMQDestination* info =
- dynamic_cast<ActiveMQDestination*>( dataStructure );
- tightMarshalString2( info->getPhysicalName(), dataOut, bs );
+ BaseDataStreamMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+
+ ActiveMQDestination* info =
+ dynamic_cast<ActiveMQDestination*>( dataStructure );
+ tightMarshalString2( info->getPhysicalName(), dataOut, bs );
+ }
+ AMQ_CATCH_RETHROW( io::IOException )
+ AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+ AMQ_CATCHALL_THROW( io::IOException )
}
///////////////////////////////////////////////////////////////////////////////
void ActiveMQDestinationMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ) {
- BaseDataStreamMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
- ActiveMQDestination* info =
- dynamic_cast<ActiveMQDestination*>( dataStructure );
- info->setPhysicalName( looseUnmarshalString( dataIn ) );
+ try {
+
+ BaseDataStreamMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+ ActiveMQDestination* info =
+ dynamic_cast<ActiveMQDestination*>( dataStructure );
+ info->setPhysicalName( looseUnmarshalString( dataIn ) );
+ }
+ AMQ_CATCH_RETHROW( io::IOException )
+ AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+ AMQ_CATCHALL_THROW( io::IOException )
}
///////////////////////////////////////////////////////////////////////////////
void ActiveMQDestinationMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ) {
- ActiveMQDestination* info =
- dynamic_cast<ActiveMQDestination*>( dataStructure );
- BaseDataStreamMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+ try {
- looseMarshalString( info->getPhysicalName(), dataOut );
+ ActiveMQDestination* info =
+ dynamic_cast<ActiveMQDestination*>( dataStructure );
+ BaseDataStreamMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+
+ looseMarshalString( info->getPhysicalName(), 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/ActiveMQMapMessageMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQMapMessageMarshaller.cpp?view=diff&rev=510313&r1=510312&r2=510313
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQMapMessageMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQMapMessageMarshaller.cpp Wed Feb 21 15:41:51 2007
@@ -48,56 +48,86 @@
///////////////////////////////////////////////////////////////////////////////
void ActiveMQMapMessageMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ) {
- MessageMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+ try {
- ActiveMQMapMessage* info =
- dynamic_cast<ActiveMQMapMessage*>( dataStructure );
- info->beforeUnmarshal( wireFormat );
+ MessageMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+ ActiveMQMapMessage* info =
+ dynamic_cast<ActiveMQMapMessage*>( dataStructure );
+ info->beforeUnmarshal( wireFormat );
- info->afterUnmarshal( wireFormat );
+
+ info->afterUnmarshal( wireFormat );
+ }
+ AMQ_CATCH_RETHROW( io::IOException )
+ AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+ AMQ_CATCHALL_THROW( io::IOException )
}
///////////////////////////////////////////////////////////////////////////////
int ActiveMQMapMessageMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ) {
- ActiveMQMapMessage* info =
- dynamic_cast<ActiveMQMapMessage*>( dataStructure );
+ try {
+
+ ActiveMQMapMessage* info =
+ dynamic_cast<ActiveMQMapMessage*>( dataStructure );
- info->beforeMarshal( wireFormat );
- int rc = MessageMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
+ info->beforeMarshal( wireFormat );
+ int rc = MessageMarshaller::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 ActiveMQMapMessageMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ) {
- MessageMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+ try {
- ActiveMQMapMessage* info =
- dynamic_cast<ActiveMQMapMessage*>( dataStructure );
- info->afterMarshal( wireFormat );
+ MessageMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+
+ ActiveMQMapMessage* info =
+ dynamic_cast<ActiveMQMapMessage*>( dataStructure );
+ info->afterMarshal( wireFormat );
+ }
+ AMQ_CATCH_RETHROW( io::IOException )
+ AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+ AMQ_CATCHALL_THROW( io::IOException )
}
///////////////////////////////////////////////////////////////////////////////
void ActiveMQMapMessageMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ) {
- MessageMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
- ActiveMQMapMessage* info =
- dynamic_cast<ActiveMQMapMessage*>( dataStructure );
- info->beforeUnmarshal( wireFormat );
- info->afterUnmarshal( wireFormat );
+ try {
+
+ MessageMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+ ActiveMQMapMessage* info =
+ dynamic_cast<ActiveMQMapMessage*>( dataStructure );
+ info->beforeUnmarshal( wireFormat );
+ info->afterUnmarshal( wireFormat );
+ }
+ AMQ_CATCH_RETHROW( io::IOException )
+ AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+ AMQ_CATCHALL_THROW( io::IOException )
}
///////////////////////////////////////////////////////////////////////////////
void ActiveMQMapMessageMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ) {
- ActiveMQMapMessage* info =
- dynamic_cast<ActiveMQMapMessage*>( dataStructure );
- info->beforeMarshal( wireFormat );
- MessageMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+ try {
- info->afterMarshal( wireFormat );
+ ActiveMQMapMessage* info =
+ dynamic_cast<ActiveMQMapMessage*>( dataStructure );
+ info->beforeMarshal( wireFormat );
+ MessageMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+
+ 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/ActiveMQMessageMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQMessageMarshaller.cpp?view=diff&rev=510313&r1=510312&r2=510313
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQMessageMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQMessageMarshaller.cpp Wed Feb 21 15:41:51 2007
@@ -48,56 +48,86 @@
///////////////////////////////////////////////////////////////////////////////
void ActiveMQMessageMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ) {
- MessageMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+ try {
- ActiveMQMessage* info =
- dynamic_cast<ActiveMQMessage*>( dataStructure );
- info->beforeUnmarshal( wireFormat );
+ MessageMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+ ActiveMQMessage* info =
+ dynamic_cast<ActiveMQMessage*>( dataStructure );
+ info->beforeUnmarshal( wireFormat );
- info->afterUnmarshal( wireFormat );
+
+ info->afterUnmarshal( wireFormat );
+ }
+ AMQ_CATCH_RETHROW( io::IOException )
+ AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+ AMQ_CATCHALL_THROW( io::IOException )
}
///////////////////////////////////////////////////////////////////////////////
int ActiveMQMessageMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ) {
- ActiveMQMessage* info =
- dynamic_cast<ActiveMQMessage*>( dataStructure );
+ try {
+
+ ActiveMQMessage* info =
+ dynamic_cast<ActiveMQMessage*>( dataStructure );
- info->beforeMarshal( wireFormat );
- int rc = MessageMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
+ info->beforeMarshal( wireFormat );
+ int rc = MessageMarshaller::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 ActiveMQMessageMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ) {
- MessageMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+ try {
- ActiveMQMessage* info =
- dynamic_cast<ActiveMQMessage*>( dataStructure );
- info->afterMarshal( wireFormat );
+ MessageMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+
+ ActiveMQMessage* info =
+ dynamic_cast<ActiveMQMessage*>( dataStructure );
+ info->afterMarshal( wireFormat );
+ }
+ AMQ_CATCH_RETHROW( io::IOException )
+ AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+ AMQ_CATCHALL_THROW( io::IOException )
}
///////////////////////////////////////////////////////////////////////////////
void ActiveMQMessageMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ) {
- MessageMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
- ActiveMQMessage* info =
- dynamic_cast<ActiveMQMessage*>( dataStructure );
- info->beforeUnmarshal( wireFormat );
- info->afterUnmarshal( wireFormat );
+ try {
+
+ MessageMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+ ActiveMQMessage* info =
+ dynamic_cast<ActiveMQMessage*>( dataStructure );
+ info->beforeUnmarshal( wireFormat );
+ info->afterUnmarshal( wireFormat );
+ }
+ AMQ_CATCH_RETHROW( io::IOException )
+ AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+ AMQ_CATCHALL_THROW( io::IOException )
}
///////////////////////////////////////////////////////////////////////////////
void ActiveMQMessageMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ) {
- ActiveMQMessage* info =
- dynamic_cast<ActiveMQMessage*>( dataStructure );
- info->beforeMarshal( wireFormat );
- MessageMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+ try {
- info->afterMarshal( wireFormat );
+ ActiveMQMessage* info =
+ dynamic_cast<ActiveMQMessage*>( dataStructure );
+ info->beforeMarshal( wireFormat );
+ MessageMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+
+ 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/ActiveMQObjectMessageMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQObjectMessageMarshaller.cpp?view=diff&rev=510313&r1=510312&r2=510313
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQObjectMessageMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQObjectMessageMarshaller.cpp Wed Feb 21 15:41:51 2007
@@ -48,56 +48,86 @@
///////////////////////////////////////////////////////////////////////////////
void ActiveMQObjectMessageMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ) {
- MessageMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+ try {
- ActiveMQObjectMessage* info =
- dynamic_cast<ActiveMQObjectMessage*>( dataStructure );
- info->beforeUnmarshal( wireFormat );
+ MessageMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+ ActiveMQObjectMessage* info =
+ dynamic_cast<ActiveMQObjectMessage*>( dataStructure );
+ info->beforeUnmarshal( wireFormat );
- info->afterUnmarshal( wireFormat );
+
+ info->afterUnmarshal( wireFormat );
+ }
+ AMQ_CATCH_RETHROW( io::IOException )
+ AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+ AMQ_CATCHALL_THROW( io::IOException )
}
///////////////////////////////////////////////////////////////////////////////
int ActiveMQObjectMessageMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ) {
- ActiveMQObjectMessage* info =
- dynamic_cast<ActiveMQObjectMessage*>( dataStructure );
+ try {
+
+ ActiveMQObjectMessage* info =
+ dynamic_cast<ActiveMQObjectMessage*>( dataStructure );
- info->beforeMarshal( wireFormat );
- int rc = MessageMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
+ info->beforeMarshal( wireFormat );
+ int rc = MessageMarshaller::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 ActiveMQObjectMessageMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ) {
- MessageMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+ try {
- ActiveMQObjectMessage* info =
- dynamic_cast<ActiveMQObjectMessage*>( dataStructure );
- info->afterMarshal( wireFormat );
+ MessageMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+
+ ActiveMQObjectMessage* info =
+ dynamic_cast<ActiveMQObjectMessage*>( dataStructure );
+ info->afterMarshal( wireFormat );
+ }
+ AMQ_CATCH_RETHROW( io::IOException )
+ AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+ AMQ_CATCHALL_THROW( io::IOException )
}
///////////////////////////////////////////////////////////////////////////////
void ActiveMQObjectMessageMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ) {
- MessageMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
- ActiveMQObjectMessage* info =
- dynamic_cast<ActiveMQObjectMessage*>( dataStructure );
- info->beforeUnmarshal( wireFormat );
- info->afterUnmarshal( wireFormat );
+ try {
+
+ MessageMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+ ActiveMQObjectMessage* info =
+ dynamic_cast<ActiveMQObjectMessage*>( dataStructure );
+ info->beforeUnmarshal( wireFormat );
+ info->afterUnmarshal( wireFormat );
+ }
+ AMQ_CATCH_RETHROW( io::IOException )
+ AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+ AMQ_CATCHALL_THROW( io::IOException )
}
///////////////////////////////////////////////////////////////////////////////
void ActiveMQObjectMessageMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ) {
- ActiveMQObjectMessage* info =
- dynamic_cast<ActiveMQObjectMessage*>( dataStructure );
- info->beforeMarshal( wireFormat );
- MessageMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+ try {
- info->afterMarshal( wireFormat );
+ ActiveMQObjectMessage* info =
+ dynamic_cast<ActiveMQObjectMessage*>( dataStructure );
+ info->beforeMarshal( wireFormat );
+ MessageMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+
+ 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/ActiveMQQueueMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQQueueMarshaller.cpp?view=diff&rev=510313&r1=510312&r2=510313
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQQueueMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQQueueMarshaller.cpp Wed Feb 21 15:41:51 2007
@@ -48,35 +48,65 @@
///////////////////////////////////////////////////////////////////////////////
void ActiveMQQueueMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ) {
- ActiveMQDestinationMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+ try {
+ ActiveMQDestinationMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+
+ }
+ AMQ_CATCH_RETHROW( io::IOException )
+ AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+ AMQ_CATCHALL_THROW( io::IOException )
}
///////////////////////////////////////////////////////////////////////////////
int ActiveMQQueueMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ) {
- int rc = ActiveMQDestinationMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
+ try {
+
+ int rc = ActiveMQDestinationMarshaller::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 ActiveMQQueueMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ) {
- ActiveMQDestinationMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+ try {
+
+ ActiveMQDestinationMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+ }
+ AMQ_CATCH_RETHROW( io::IOException )
+ AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+ AMQ_CATCHALL_THROW( io::IOException )
}
///////////////////////////////////////////////////////////////////////////////
void ActiveMQQueueMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ) {
- ActiveMQDestinationMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+ try {
+
+ ActiveMQDestinationMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+ }
+ AMQ_CATCH_RETHROW( io::IOException )
+ AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+ AMQ_CATCHALL_THROW( io::IOException )
}
///////////////////////////////////////////////////////////////////////////////
void ActiveMQQueueMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ) {
- ActiveMQDestinationMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+ try {
+
+ ActiveMQDestinationMarshaller::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/ActiveMQStreamMessageMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQStreamMessageMarshaller.cpp?view=diff&rev=510313&r1=510312&r2=510313
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQStreamMessageMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQStreamMessageMarshaller.cpp Wed Feb 21 15:41:51 2007
@@ -48,56 +48,86 @@
///////////////////////////////////////////////////////////////////////////////
void ActiveMQStreamMessageMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ) {
- MessageMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+ try {
- ActiveMQStreamMessage* info =
- dynamic_cast<ActiveMQStreamMessage*>( dataStructure );
- info->beforeUnmarshal( wireFormat );
+ MessageMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+ ActiveMQStreamMessage* info =
+ dynamic_cast<ActiveMQStreamMessage*>( dataStructure );
+ info->beforeUnmarshal( wireFormat );
- info->afterUnmarshal( wireFormat );
+
+ info->afterUnmarshal( wireFormat );
+ }
+ AMQ_CATCH_RETHROW( io::IOException )
+ AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+ AMQ_CATCHALL_THROW( io::IOException )
}
///////////////////////////////////////////////////////////////////////////////
int ActiveMQStreamMessageMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ) {
- ActiveMQStreamMessage* info =
- dynamic_cast<ActiveMQStreamMessage*>( dataStructure );
+ try {
+
+ ActiveMQStreamMessage* info =
+ dynamic_cast<ActiveMQStreamMessage*>( dataStructure );
- info->beforeMarshal( wireFormat );
- int rc = MessageMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
+ info->beforeMarshal( wireFormat );
+ int rc = MessageMarshaller::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 ActiveMQStreamMessageMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ) {
- MessageMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+ try {
- ActiveMQStreamMessage* info =
- dynamic_cast<ActiveMQStreamMessage*>( dataStructure );
- info->afterMarshal( wireFormat );
+ MessageMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+
+ ActiveMQStreamMessage* info =
+ dynamic_cast<ActiveMQStreamMessage*>( dataStructure );
+ info->afterMarshal( wireFormat );
+ }
+ AMQ_CATCH_RETHROW( io::IOException )
+ AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+ AMQ_CATCHALL_THROW( io::IOException )
}
///////////////////////////////////////////////////////////////////////////////
void ActiveMQStreamMessageMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ) {
- MessageMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
- ActiveMQStreamMessage* info =
- dynamic_cast<ActiveMQStreamMessage*>( dataStructure );
- info->beforeUnmarshal( wireFormat );
- info->afterUnmarshal( wireFormat );
+ try {
+
+ MessageMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+ ActiveMQStreamMessage* info =
+ dynamic_cast<ActiveMQStreamMessage*>( dataStructure );
+ info->beforeUnmarshal( wireFormat );
+ info->afterUnmarshal( wireFormat );
+ }
+ AMQ_CATCH_RETHROW( io::IOException )
+ AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+ AMQ_CATCHALL_THROW( io::IOException )
}
///////////////////////////////////////////////////////////////////////////////
void ActiveMQStreamMessageMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ) {
- ActiveMQStreamMessage* info =
- dynamic_cast<ActiveMQStreamMessage*>( dataStructure );
- info->beforeMarshal( wireFormat );
- MessageMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+ try {
- info->afterMarshal( wireFormat );
+ ActiveMQStreamMessage* info =
+ dynamic_cast<ActiveMQStreamMessage*>( dataStructure );
+ info->beforeMarshal( wireFormat );
+ MessageMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+
+ 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/ActiveMQTempDestinationMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQTempDestinationMarshaller.cpp?view=diff&rev=510313&r1=510312&r2=510313
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQTempDestinationMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQTempDestinationMarshaller.cpp Wed Feb 21 15:41:51 2007
@@ -38,35 +38,65 @@
///////////////////////////////////////////////////////////////////////////////
void ActiveMQTempDestinationMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ) {
- ActiveMQDestinationMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+ try {
+ ActiveMQDestinationMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+
+ }
+ AMQ_CATCH_RETHROW( io::IOException )
+ AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+ AMQ_CATCHALL_THROW( io::IOException )
}
///////////////////////////////////////////////////////////////////////////////
int ActiveMQTempDestinationMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ) {
- int rc = ActiveMQDestinationMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
+ try {
+
+ int rc = ActiveMQDestinationMarshaller::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 ActiveMQTempDestinationMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ) {
- ActiveMQDestinationMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+ try {
+
+ ActiveMQDestinationMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+ }
+ AMQ_CATCH_RETHROW( io::IOException )
+ AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+ AMQ_CATCHALL_THROW( io::IOException )
}
///////////////////////////////////////////////////////////////////////////////
void ActiveMQTempDestinationMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ) {
- ActiveMQDestinationMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+ try {
+
+ ActiveMQDestinationMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+ }
+ AMQ_CATCH_RETHROW( io::IOException )
+ AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+ AMQ_CATCHALL_THROW( io::IOException )
}
///////////////////////////////////////////////////////////////////////////////
void ActiveMQTempDestinationMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ) {
- ActiveMQDestinationMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+ try {
+
+ ActiveMQDestinationMarshaller::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/ActiveMQTempQueueMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQTempQueueMarshaller.cpp?view=diff&rev=510313&r1=510312&r2=510313
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQTempQueueMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQTempQueueMarshaller.cpp Wed Feb 21 15:41:51 2007
@@ -48,35 +48,65 @@
///////////////////////////////////////////////////////////////////////////////
void ActiveMQTempQueueMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ) {
- ActiveMQTempDestinationMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+ try {
+ ActiveMQTempDestinationMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+
+ }
+ AMQ_CATCH_RETHROW( io::IOException )
+ AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+ AMQ_CATCHALL_THROW( io::IOException )
}
///////////////////////////////////////////////////////////////////////////////
int ActiveMQTempQueueMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ) {
- int rc = ActiveMQTempDestinationMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
+ try {
+
+ int rc = ActiveMQTempDestinationMarshaller::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 ActiveMQTempQueueMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ) {
- ActiveMQTempDestinationMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+ try {
+
+ ActiveMQTempDestinationMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+ }
+ AMQ_CATCH_RETHROW( io::IOException )
+ AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+ AMQ_CATCHALL_THROW( io::IOException )
}
///////////////////////////////////////////////////////////////////////////////
void ActiveMQTempQueueMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ) {
- ActiveMQTempDestinationMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+ try {
+
+ ActiveMQTempDestinationMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+ }
+ AMQ_CATCH_RETHROW( io::IOException )
+ AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+ AMQ_CATCHALL_THROW( io::IOException )
}
///////////////////////////////////////////////////////////////////////////////
void ActiveMQTempQueueMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ) {
- ActiveMQTempDestinationMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+ try {
+
+ ActiveMQTempDestinationMarshaller::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/ActiveMQTempTopicMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQTempTopicMarshaller.cpp?view=diff&rev=510313&r1=510312&r2=510313
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQTempTopicMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQTempTopicMarshaller.cpp Wed Feb 21 15:41:51 2007
@@ -48,35 +48,65 @@
///////////////////////////////////////////////////////////////////////////////
void ActiveMQTempTopicMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ) {
- ActiveMQTempDestinationMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+ try {
+ ActiveMQTempDestinationMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+
+ }
+ AMQ_CATCH_RETHROW( io::IOException )
+ AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+ AMQ_CATCHALL_THROW( io::IOException )
}
///////////////////////////////////////////////////////////////////////////////
int ActiveMQTempTopicMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ) {
- int rc = ActiveMQTempDestinationMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
+ try {
+
+ int rc = ActiveMQTempDestinationMarshaller::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 ActiveMQTempTopicMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ) {
- ActiveMQTempDestinationMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+ try {
+
+ ActiveMQTempDestinationMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+ }
+ AMQ_CATCH_RETHROW( io::IOException )
+ AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+ AMQ_CATCHALL_THROW( io::IOException )
}
///////////////////////////////////////////////////////////////////////////////
void ActiveMQTempTopicMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ) {
- ActiveMQTempDestinationMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+ try {
+
+ ActiveMQTempDestinationMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+ }
+ AMQ_CATCH_RETHROW( io::IOException )
+ AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+ AMQ_CATCHALL_THROW( io::IOException )
}
///////////////////////////////////////////////////////////////////////////////
void ActiveMQTempTopicMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ) {
- ActiveMQTempDestinationMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+ try {
+
+ ActiveMQTempDestinationMarshaller::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/ActiveMQTextMessageMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQTextMessageMarshaller.cpp?view=diff&rev=510313&r1=510312&r2=510313
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQTextMessageMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQTextMessageMarshaller.cpp Wed Feb 21 15:41:51 2007
@@ -48,56 +48,86 @@
///////////////////////////////////////////////////////////////////////////////
void ActiveMQTextMessageMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ) {
- MessageMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+ try {
- ActiveMQTextMessage* info =
- dynamic_cast<ActiveMQTextMessage*>( dataStructure );
- info->beforeUnmarshal( wireFormat );
+ MessageMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+ ActiveMQTextMessage* info =
+ dynamic_cast<ActiveMQTextMessage*>( dataStructure );
+ info->beforeUnmarshal( wireFormat );
- info->afterUnmarshal( wireFormat );
+
+ info->afterUnmarshal( wireFormat );
+ }
+ AMQ_CATCH_RETHROW( io::IOException )
+ AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+ AMQ_CATCHALL_THROW( io::IOException )
}
///////////////////////////////////////////////////////////////////////////////
int ActiveMQTextMessageMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ) {
- ActiveMQTextMessage* info =
- dynamic_cast<ActiveMQTextMessage*>( dataStructure );
+ try {
+
+ ActiveMQTextMessage* info =
+ dynamic_cast<ActiveMQTextMessage*>( dataStructure );
- info->beforeMarshal( wireFormat );
- int rc = MessageMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
+ info->beforeMarshal( wireFormat );
+ int rc = MessageMarshaller::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 ActiveMQTextMessageMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ) {
- MessageMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+ try {
- ActiveMQTextMessage* info =
- dynamic_cast<ActiveMQTextMessage*>( dataStructure );
- info->afterMarshal( wireFormat );
+ MessageMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+
+ ActiveMQTextMessage* info =
+ dynamic_cast<ActiveMQTextMessage*>( dataStructure );
+ info->afterMarshal( wireFormat );
+ }
+ AMQ_CATCH_RETHROW( io::IOException )
+ AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+ AMQ_CATCHALL_THROW( io::IOException )
}
///////////////////////////////////////////////////////////////////////////////
void ActiveMQTextMessageMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ) {
- MessageMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
- ActiveMQTextMessage* info =
- dynamic_cast<ActiveMQTextMessage*>( dataStructure );
- info->beforeUnmarshal( wireFormat );
- info->afterUnmarshal( wireFormat );
+ try {
+
+ MessageMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+ ActiveMQTextMessage* info =
+ dynamic_cast<ActiveMQTextMessage*>( dataStructure );
+ info->beforeUnmarshal( wireFormat );
+ info->afterUnmarshal( wireFormat );
+ }
+ AMQ_CATCH_RETHROW( io::IOException )
+ AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+ AMQ_CATCHALL_THROW( io::IOException )
}
///////////////////////////////////////////////////////////////////////////////
void ActiveMQTextMessageMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ) {
- ActiveMQTextMessage* info =
- dynamic_cast<ActiveMQTextMessage*>( dataStructure );
- info->beforeMarshal( wireFormat );
- MessageMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+ try {
- info->afterMarshal( wireFormat );
+ ActiveMQTextMessage* info =
+ dynamic_cast<ActiveMQTextMessage*>( dataStructure );
+ info->beforeMarshal( wireFormat );
+ MessageMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+
+ 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/ActiveMQTopicMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQTopicMarshaller.cpp?view=diff&rev=510313&r1=510312&r2=510313
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQTopicMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQTopicMarshaller.cpp Wed Feb 21 15:41:51 2007
@@ -48,35 +48,65 @@
///////////////////////////////////////////////////////////////////////////////
void ActiveMQTopicMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ) {
- ActiveMQDestinationMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+ try {
+ ActiveMQDestinationMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+
+ }
+ AMQ_CATCH_RETHROW( io::IOException )
+ AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+ AMQ_CATCHALL_THROW( io::IOException )
}
///////////////////////////////////////////////////////////////////////////////
int ActiveMQTopicMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ) {
- int rc = ActiveMQDestinationMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
+ try {
+
+ int rc = ActiveMQDestinationMarshaller::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 ActiveMQTopicMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ) {
- ActiveMQDestinationMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+ try {
+
+ ActiveMQDestinationMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+ }
+ AMQ_CATCH_RETHROW( io::IOException )
+ AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+ AMQ_CATCHALL_THROW( io::IOException )
}
///////////////////////////////////////////////////////////////////////////////
void ActiveMQTopicMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ) {
- ActiveMQDestinationMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+ try {
+
+ ActiveMQDestinationMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+ }
+ AMQ_CATCH_RETHROW( io::IOException )
+ AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+ AMQ_CATCHALL_THROW( io::IOException )
}
///////////////////////////////////////////////////////////////////////////////
void ActiveMQTopicMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ) {
- ActiveMQDestinationMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+ try {
+
+ ActiveMQDestinationMarshaller::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/BaseCommandMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/BaseCommandMarshaller.cpp?view=diff&rev=510313&r1=510312&r2=510313
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/BaseCommandMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/BaseCommandMarshaller.cpp Wed Feb 21 15:41:51 2007
@@ -38,55 +38,85 @@
///////////////////////////////////////////////////////////////////////////////
void BaseCommandMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ) {
- BaseDataStreamMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+ try {
- transport::Command* info =
- dynamic_cast<transport::Command*>( dataStructure );
- info->setCommandId( dataIn->readInt() );
- info->setResponseRequired( bs->readBoolean() );
+ BaseDataStreamMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+
+ transport::Command* info =
+ dynamic_cast<transport::Command*>( dataStructure );
+ info->setCommandId( dataIn->readInt() );
+ info->setResponseRequired( bs->readBoolean() );
+ }
+ AMQ_CATCH_RETHROW( io::IOException )
+ AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+ AMQ_CATCHALL_THROW( io::IOException )
}
///////////////////////////////////////////////////////////////////////////////
int BaseCommandMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ) {
- transport::Command* info =
- dynamic_cast<transport::Command*>( dataStructure );
+ try {
+
+ transport::Command* info =
+ dynamic_cast<transport::Command*>( dataStructure );
- int rc = BaseDataStreamMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
- bs->writeBoolean( info->isResponseRequired() );
+ int rc = BaseDataStreamMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
+ bs->writeBoolean( info->isResponseRequired() );
- 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 BaseCommandMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ) {
- BaseDataStreamMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+ try {
- transport::Command* info =
- dynamic_cast<transport::Command*>( dataStructure );
- dataOut->writeInt( info->getCommandId() );
- bs->readBoolean();
+ BaseDataStreamMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+
+ transport::Command* info =
+ dynamic_cast<transport::Command*>( dataStructure );
+ dataOut->writeInt( info->getCommandId() );
+ bs->readBoolean();
+ }
+ AMQ_CATCH_RETHROW( io::IOException )
+ AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+ AMQ_CATCHALL_THROW( io::IOException )
}
///////////////////////////////////////////////////////////////////////////////
void BaseCommandMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ) {
- BaseDataStreamMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
- transport::Command* info =
- dynamic_cast<transport::Command*>( dataStructure );
- info->setCommandId( dataIn->readInt() );
- info->setResponseRequired( dataIn->readBoolean() );
+ try {
+
+ BaseDataStreamMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+ transport::Command* info =
+ dynamic_cast<transport::Command*>( dataStructure );
+ info->setCommandId( dataIn->readInt() );
+ info->setResponseRequired( dataIn->readBoolean() );
+ }
+ AMQ_CATCH_RETHROW( io::IOException )
+ AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+ AMQ_CATCHALL_THROW( io::IOException )
}
///////////////////////////////////////////////////////////////////////////////
void BaseCommandMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ) {
- transport::Command* info =
- dynamic_cast<transport::Command*>( dataStructure );
- BaseDataStreamMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+ try {
- dataOut->writeInt( info->getCommandId() );
- dataOut->writeBoolean( info->isResponseRequired() );
+ transport::Command* info =
+ dynamic_cast<transport::Command*>( dataStructure );
+ BaseDataStreamMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+
+ dataOut->writeInt( info->getCommandId() );
+ dataOut->writeBoolean( info->isResponseRequired() );
+ }
+ 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/BrokerIdMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/BrokerIdMarshaller.cpp?view=diff&rev=510313&r1=510312&r2=510313
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/BrokerIdMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/BrokerIdMarshaller.cpp Wed Feb 21 15:41:51 2007
@@ -48,51 +48,81 @@
///////////////////////////////////////////////////////////////////////////////
void BrokerIdMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ) {
- BaseDataStreamMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+ try {
- BrokerId* info =
- dynamic_cast<BrokerId*>( dataStructure );
- info->setValue( tightUnmarshalString( dataIn, bs ) );
+ BaseDataStreamMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+
+ BrokerId* info =
+ dynamic_cast<BrokerId*>( dataStructure );
+ info->setValue( tightUnmarshalString( dataIn, bs ) );
+ }
+ AMQ_CATCH_RETHROW( io::IOException )
+ AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+ AMQ_CATCHALL_THROW( io::IOException )
}
///////////////////////////////////////////////////////////////////////////////
int BrokerIdMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ) {
- BrokerId* info =
- dynamic_cast<BrokerId*>( dataStructure );
+ try {
+
+ BrokerId* info =
+ dynamic_cast<BrokerId*>( dataStructure );
- int rc = BaseDataStreamMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
- rc += tightMarshalString1( info->getValue(), bs );
+ int rc = BaseDataStreamMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
+ rc += tightMarshalString1( info->getValue(), 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 BrokerIdMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ) {
- BaseDataStreamMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+ try {
- BrokerId* info =
- dynamic_cast<BrokerId*>( dataStructure );
- tightMarshalString2( info->getValue(), dataOut, bs );
+ BaseDataStreamMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+
+ BrokerId* info =
+ dynamic_cast<BrokerId*>( dataStructure );
+ tightMarshalString2( info->getValue(), dataOut, bs );
+ }
+ AMQ_CATCH_RETHROW( io::IOException )
+ AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+ AMQ_CATCHALL_THROW( io::IOException )
}
///////////////////////////////////////////////////////////////////////////////
void BrokerIdMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ) {
- BaseDataStreamMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
- BrokerId* info =
- dynamic_cast<BrokerId*>( dataStructure );
- info->setValue( looseUnmarshalString( dataIn ) );
+ try {
+
+ BaseDataStreamMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+ BrokerId* info =
+ dynamic_cast<BrokerId*>( dataStructure );
+ info->setValue( looseUnmarshalString( dataIn ) );
+ }
+ AMQ_CATCH_RETHROW( io::IOException )
+ AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+ AMQ_CATCHALL_THROW( io::IOException )
}
///////////////////////////////////////////////////////////////////////////////
void BrokerIdMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ) {
- BrokerId* info =
- dynamic_cast<BrokerId*>( dataStructure );
- BaseDataStreamMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+ try {
- looseMarshalString( info->getValue(), dataOut );
+ BrokerId* info =
+ dynamic_cast<BrokerId*>( dataStructure );
+ BaseDataStreamMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+
+ looseMarshalString( 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/BrokerInfoMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/BrokerInfoMarshaller.cpp?view=diff&rev=510313&r1=510312&r2=510313
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/BrokerInfoMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/BrokerInfoMarshaller.cpp Wed Feb 21 15:41:51 2007
@@ -48,120 +48,150 @@
///////////////////////////////////////////////////////////////////////////////
void BrokerInfoMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ) {
- BaseCommandMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+ try {
- BrokerInfo* info =
- dynamic_cast<BrokerInfo*>( dataStructure );
- info->setBrokerId( dynamic_cast< BrokerId* >(
- tightUnmarshalCachedObject( wireFormat, dataIn, bs ) ) );
- info->setBrokerURL( tightUnmarshalString( dataIn, bs ) );
-
- if( bs->readBoolean() ) {
- short size = dataIn->readShort();
- info->getPeerBrokerInfos().reserve( size );
- for( int i = 0; i < size; i++ ) {
- info->getPeerBrokerInfos().push_back( dynamic_cast< BrokerInfo* >(
- tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) );
+ BaseCommandMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+
+ BrokerInfo* info =
+ dynamic_cast<BrokerInfo*>( dataStructure );
+ info->setBrokerId( dynamic_cast< BrokerId* >(
+ tightUnmarshalCachedObject( wireFormat, dataIn, bs ) ) );
+ info->setBrokerURL( tightUnmarshalString( dataIn, bs ) );
+
+ if( bs->readBoolean() ) {
+ short size = dataIn->readShort();
+ info->getPeerBrokerInfos().reserve( size );
+ for( int i = 0; i < size; i++ ) {
+ info->getPeerBrokerInfos().push_back( dynamic_cast< BrokerInfo* >(
+ tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) );
+ }
}
+ else {
+ info->getPeerBrokerInfos().clear();
+ }
+ info->setBrokerName( tightUnmarshalString( dataIn, bs ) );
+ info->setSlaveBroker( bs->readBoolean() );
+ info->setMasterBroker( bs->readBoolean() );
+ info->setFaultTolerantConfiguration( bs->readBoolean() );
+ info->setDuplexConnection( bs->readBoolean() );
+ info->setNetworkConnection( bs->readBoolean() );
+ info->setConnectionId( tightUnmarshalLong( wireFormat, dataIn, bs ) );
}
- else {
- info->getPeerBrokerInfos().clear();
- }
- info->setBrokerName( tightUnmarshalString( dataIn, bs ) );
- info->setSlaveBroker( bs->readBoolean() );
- info->setMasterBroker( bs->readBoolean() );
- info->setFaultTolerantConfiguration( bs->readBoolean() );
- info->setDuplexConnection( bs->readBoolean() );
- info->setNetworkConnection( bs->readBoolean() );
- info->setConnectionId( tightUnmarshalLong( wireFormat, dataIn, bs ) );
+ AMQ_CATCH_RETHROW( io::IOException )
+ AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+ AMQ_CATCHALL_THROW( io::IOException )
}
///////////////////////////////////////////////////////////////////////////////
int BrokerInfoMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ) {
- BrokerInfo* info =
- dynamic_cast<BrokerInfo*>( dataStructure );
+ try {
- int rc = BaseCommandMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
- rc += tightMarshalCachedObject1( wireFormat, info->getBrokerId(), bs );
- rc += tightMarshalString1( info->getBrokerURL(), bs );
- rc += tightMarshalObjectArray1( wireFormat, info->getPeerBrokerInfos(), bs );
- rc += tightMarshalString1( info->getBrokerName(), bs );
- bs->writeBoolean( info->isSlaveBroker() );
- bs->writeBoolean( info->isMasterBroker() );
- bs->writeBoolean( info->isFaultTolerantConfiguration() );
- bs->writeBoolean( info->isDuplexConnection() );
- bs->writeBoolean( info->isNetworkConnection() );
- rc += tightMarshalLong1( wireFormat, info->getConnectionId(), bs );
+ BrokerInfo* info =
+ dynamic_cast<BrokerInfo*>( dataStructure );
- return rc + 0;
+ int rc = BaseCommandMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
+ rc += tightMarshalCachedObject1( wireFormat, info->getBrokerId(), bs );
+ rc += tightMarshalString1( info->getBrokerURL(), bs );
+ rc += tightMarshalObjectArray1( wireFormat, info->getPeerBrokerInfos(), bs );
+ rc += tightMarshalString1( info->getBrokerName(), bs );
+ bs->writeBoolean( info->isSlaveBroker() );
+ bs->writeBoolean( info->isMasterBroker() );
+ bs->writeBoolean( info->isFaultTolerantConfiguration() );
+ bs->writeBoolean( info->isDuplexConnection() );
+ bs->writeBoolean( info->isNetworkConnection() );
+ rc += tightMarshalLong1( 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 BrokerInfoMarshaller::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 );
- BrokerInfo* info =
- dynamic_cast<BrokerInfo*>( dataStructure );
- tightMarshalCachedObject2( wireFormat, info->getBrokerId(), dataOut, bs );
- tightMarshalString2( info->getBrokerURL(), dataOut, bs );
- tightMarshalObjectArray2( wireFormat, info->getPeerBrokerInfos(), dataOut, bs );
- tightMarshalString2( info->getBrokerName(), dataOut, bs );
- bs->readBoolean();
- bs->readBoolean();
- bs->readBoolean();
- bs->readBoolean();
- bs->readBoolean();
- tightMarshalLong2( wireFormat, info->getConnectionId(), dataOut, bs );
+ BrokerInfo* info =
+ dynamic_cast<BrokerInfo*>( dataStructure );
+ tightMarshalCachedObject2( wireFormat, info->getBrokerId(), dataOut, bs );
+ tightMarshalString2( info->getBrokerURL(), dataOut, bs );
+ tightMarshalObjectArray2( wireFormat, info->getPeerBrokerInfos(), dataOut, bs );
+ tightMarshalString2( info->getBrokerName(), dataOut, bs );
+ bs->readBoolean();
+ bs->readBoolean();
+ bs->readBoolean();
+ bs->readBoolean();
+ bs->readBoolean();
+ tightMarshalLong2( wireFormat, info->getConnectionId(), dataOut, bs );
+ }
+ AMQ_CATCH_RETHROW( io::IOException )
+ AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+ AMQ_CATCHALL_THROW( io::IOException )
}
///////////////////////////////////////////////////////////////////////////////
void BrokerInfoMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ) {
- BaseCommandMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
- BrokerInfo* info =
- dynamic_cast<BrokerInfo*>( dataStructure );
- info->setBrokerId( dynamic_cast< BrokerId* >(
- looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
- info->setBrokerURL( looseUnmarshalString( dataIn ) );
-
- if( dataIn->readBoolean() ) {
- short size = dataIn->readShort();
- info->getPeerBrokerInfos().reserve( size );
- for( int i = 0; i < size; i++ ) {
- info->getPeerBrokerInfos().push_back( dynamic_cast<BrokerInfo* >(
- looseUnmarshalNestedObject( wireFormat, dataIn ) ) );
+ try {
+
+ BaseCommandMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+ BrokerInfo* info =
+ dynamic_cast<BrokerInfo*>( dataStructure );
+ info->setBrokerId( dynamic_cast< BrokerId* >(
+ looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
+ info->setBrokerURL( looseUnmarshalString( dataIn ) );
+
+ if( dataIn->readBoolean() ) {
+ short size = dataIn->readShort();
+ info->getPeerBrokerInfos().reserve( size );
+ for( int i = 0; i < size; i++ ) {
+ info->getPeerBrokerInfos().push_back( dynamic_cast<BrokerInfo* >(
+ looseUnmarshalNestedObject( wireFormat, dataIn ) ) );
+ }
}
+ else {
+ info->getPeerBrokerInfos().clear();
+ }
+ info->setBrokerName( looseUnmarshalString( dataIn ) );
+ info->setSlaveBroker( dataIn->readBoolean() );
+ info->setMasterBroker( dataIn->readBoolean() );
+ info->setFaultTolerantConfiguration( dataIn->readBoolean() );
+ info->setDuplexConnection( dataIn->readBoolean() );
+ info->setNetworkConnection( dataIn->readBoolean() );
+ info->setConnectionId( looseUnmarshalLong( wireFormat, dataIn ) );
}
- else {
- info->getPeerBrokerInfos().clear();
- }
- info->setBrokerName( looseUnmarshalString( dataIn ) );
- info->setSlaveBroker( dataIn->readBoolean() );
- info->setMasterBroker( dataIn->readBoolean() );
- info->setFaultTolerantConfiguration( dataIn->readBoolean() );
- info->setDuplexConnection( dataIn->readBoolean() );
- info->setNetworkConnection( dataIn->readBoolean() );
- info->setConnectionId( looseUnmarshalLong( wireFormat, dataIn ) );
+ AMQ_CATCH_RETHROW( io::IOException )
+ AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+ AMQ_CATCHALL_THROW( io::IOException )
}
///////////////////////////////////////////////////////////////////////////////
void BrokerInfoMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ) {
- BrokerInfo* info =
- dynamic_cast<BrokerInfo*>( dataStructure );
- BaseCommandMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
-
- looseMarshalCachedObject( wireFormat, info->getBrokerId(), dataOut );
- looseMarshalString( info->getBrokerURL(), dataOut );
- looseMarshalObjectArray( wireFormat, info->getPeerBrokerInfos(), dataOut );
- looseMarshalString( info->getBrokerName(), dataOut );
- dataOut->writeBoolean( info->isSlaveBroker() );
- dataOut->writeBoolean( info->isMasterBroker() );
- dataOut->writeBoolean( info->isFaultTolerantConfiguration() );
- dataOut->writeBoolean( info->isDuplexConnection() );
- dataOut->writeBoolean( info->isNetworkConnection() );
- looseMarshalLong( wireFormat, info->getConnectionId(), dataOut );
+ try {
+
+ BrokerInfo* info =
+ dynamic_cast<BrokerInfo*>( dataStructure );
+ BaseCommandMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+
+ looseMarshalCachedObject( wireFormat, info->getBrokerId(), dataOut );
+ looseMarshalString( info->getBrokerURL(), dataOut );
+ looseMarshalObjectArray( wireFormat, info->getPeerBrokerInfos(), dataOut );
+ looseMarshalString( info->getBrokerName(), dataOut );
+ dataOut->writeBoolean( info->isSlaveBroker() );
+ dataOut->writeBoolean( info->isMasterBroker() );
+ dataOut->writeBoolean( info->isFaultTolerantConfiguration() );
+ dataOut->writeBoolean( info->isDuplexConnection() );
+ dataOut->writeBoolean( info->isNetworkConnection() );
+ looseMarshalLong( wireFormat, info->getConnectionId(), dataOut );
+ }
+ AMQ_CATCH_RETHROW( io::IOException )
+ AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+ AMQ_CATCHALL_THROW( io::IOException )
}