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 2008/08/14 02:06:12 UTC

svn commit: r685732 - in /activemq/activemq-cpp/trunk/src: main/activemq/connector/openwire/commands/ main/activemq/connector/openwire/marshal/v3/ test/activemq/connector/openwire/marshal/v3/

Author: tabish
Date: Wed Aug 13 17:06:12 2008
New Revision: 685732

URL: http://svn.apache.org/viewvc?rev=685732&view=rev
Log:
http://issues.apache.org/activemq/browse/AMQCPP-179

New Generated V3 Commands

Added:
    activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQBlobMessage.cpp
    activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQBlobMessage.h
    activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ActiveMQBlobMessageMarshaller.cpp
    activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ActiveMQBlobMessageMarshaller.h
    activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/ActiveMQBlobMessageMarshallerTest.cpp
    activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/ActiveMQBlobMessageMarshallerTest.h
Modified:
    activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQObjectMessage.h
    activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQStreamMessage.h
    activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/srcmakefile.mk
    activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/MarshallerFactory.cpp
    activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/srcmakefile.mk
    activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/srcmakefile.mk

Added: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQBlobMessage.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQBlobMessage.cpp?rev=685732&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQBlobMessage.cpp (added)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQBlobMessage.cpp Wed Aug 13 17:06:12 2008
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "ActiveMQBlobMessage.h"
+
+using namespace std;
+using namespace activemq;
+using namespace activemq::connector;
+using namespace activemq::connector::openwire;
+using namespace activemq::connector::openwire::commands;
+
+////////////////////////////////////////////////////////////////////////////////
+ActiveMQBlobMessage::ActiveMQBlobMessage() {
+}
+
+////////////////////////////////////////////////////////////////////////////////
+unsigned char ActiveMQBlobMessage::getDataStructureType() const {
+    return ActiveMQBlobMessage::ID_ACTIVEMQBLOBMESSAGE;
+}

Added: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQBlobMessage.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQBlobMessage.h?rev=685732&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQBlobMessage.h (added)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQBlobMessage.h Wed Aug 13 17:06:12 2008
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _ACTIVEMQ_CONNECTOR_OPENWIRE_COMMANDS_ACTIVEMQBLOBMESSAGE_H_
+#define _ACTIVEMQ_CONNECTOR_OPENWIRE_COMMANDS_ACTIVEMQBLOBMESSAGE_H_
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+#include <activemq/connector/openwire/commands/ActiveMQMessage.h>
+
+namespace activemq {
+namespace connector {
+namespace openwire {
+namespace commands {
+
+    class ActiveMQBlobMessage : public ActiveMQMessage {
+
+    public:
+
+        const static unsigned char ID_ACTIVEMQBLOBMESSAGE = 29;
+
+    public:
+
+        ActiveMQBlobMessage();
+        virtual ~ActiveMQBlobMessage() {}
+
+        virtual unsigned char getDataStructureType() const;
+
+        /**
+         * Clone this object and return a new instance that the
+         * caller now owns, this will be an exact copy of this one
+         * @returns new copy of this object.
+         */
+        virtual ActiveMQBlobMessage* cloneDataStructure() const {
+            ActiveMQBlobMessage* message = new ActiveMQBlobMessage();
+            message->copyDataStructure( this );
+            return message;
+        }
+
+        /**
+         * Copy the contents of the passed object into this objects
+         * members, overwriting any existing data.
+         * @return src - Source Object
+         */
+        virtual void copyDataStructure( const DataStructure* src ) {
+            ActiveMQMessage::copyDataStructure( src );
+        }
+
+    public:  // ActiveMQMessage
+
+        /**
+         * Returns if this message has expired, meaning that its
+         * Expiration time has elapsed.
+         * @returns true if message is expired.
+         */
+        virtual bool isExpired() const {
+            return false;
+        }
+
+    };
+
+}}}}
+
+#endif /* _ACTIVEMQ_CONNECTOR_OPENWIRE_COMMANDS_ACTIVEMQBLOBMESSAGE_H_ */

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQObjectMessage.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQObjectMessage.h?rev=685732&r1=685731&r2=685732&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQObjectMessage.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQObjectMessage.h Wed Aug 13 17:06:12 2008
@@ -93,7 +93,7 @@
     public:  // cms::Message
 
         /**
-         * Clonse this message exactly, returns a new instance that the
+         * Clone this message exactly, returns a new instance that the
          * caller is required to delete.
          * @return new copy of this message
          */

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQStreamMessage.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQStreamMessage.h?rev=685732&r1=685731&r2=685732&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQStreamMessage.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/ActiveMQStreamMessage.h Wed Aug 13 17:06:12 2008
@@ -24,7 +24,6 @@
 #endif
 
 #include <activemq/connector/openwire/commands/ActiveMQMessage.h>
-#include <vector>
 #include <string>
 
 namespace activemq{

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/srcmakefile.mk
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/srcmakefile.mk?rev=685732&r1=685731&r2=685732&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/srcmakefile.mk (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/commands/srcmakefile.mk Wed Aug 13 17:06:12 2008
@@ -16,6 +16,7 @@
 # ---------------------------------------------------------------------------
 
 cc_sources += \
+    activemq/connector/openwire/commands/ActiveMQBlobMessage.cpp \
     activemq/connector/openwire/commands/ActiveMQBytesMessage.cpp \
     activemq/connector/openwire/commands/ActiveMQDestination.cpp \
     activemq/connector/openwire/commands/ActiveMQMapMessage.cpp \
@@ -77,6 +78,7 @@
     activemq/connector/openwire/commands/XATransactionId.cpp
 
 h_sources += \
+    activemq/connector/openwire/commands/ActiveMQBlobMessage.h \
     activemq/connector/openwire/commands/ActiveMQBytesMessage.h \
     activemq/connector/openwire/commands/ActiveMQDestination.h \
     activemq/connector/openwire/commands/ActiveMQMapMessage.h \

Added: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ActiveMQBlobMessageMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ActiveMQBlobMessageMarshaller.cpp?rev=685732&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ActiveMQBlobMessageMarshaller.cpp (added)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ActiveMQBlobMessageMarshaller.cpp Wed Aug 13 17:06:12 2008
@@ -0,0 +1,127 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <activemq/connector/openwire/marshal/v3/ActiveMQBlobMessageMarshaller.h>
+
+#include <activemq/connector/openwire/commands/ActiveMQBlobMessage.h>
+#include <activemq/exceptions/ActiveMQException.h>
+
+//
+//     NOTE!: This file is autogenerated - do not modify!
+//            if you need to make a change, please see the Java Classes in the
+//            activemq-core module
+//
+
+using namespace std;
+using namespace activemq;
+using namespace activemq::exceptions;
+using namespace activemq::connector;
+using namespace activemq::connector::openwire;
+using namespace activemq::connector::openwire::commands;
+using namespace activemq::connector::openwire::marshal;
+using namespace activemq::connector::openwire::utils;
+using namespace activemq::connector::openwire::marshal::v3;
+using namespace decaf;
+using namespace decaf::io;
+
+///////////////////////////////////////////////////////////////////////////////
+DataStructure* ActiveMQBlobMessageMarshaller::createObject() const {
+    return new ActiveMQBlobMessage();
+}
+
+///////////////////////////////////////////////////////////////////////////////
+unsigned char ActiveMQBlobMessageMarshaller::getDataStructureType() const {
+    return ActiveMQBlobMessage::ID_ACTIVEMQBLOBMESSAGE;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void ActiveMQBlobMessageMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( decaf::io::IOException ) {
+
+    try {
+
+        ActiveMQMessageMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+
+        ActiveMQBlobMessage* info =
+            dynamic_cast<ActiveMQBlobMessage*>( dataStructure );
+
+    }
+    AMQ_CATCH_RETHROW( decaf::io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException )
+    AMQ_CATCHALL_THROW( decaf::io::IOException )
+}
+
+///////////////////////////////////////////////////////////////////////////////
+int ActiveMQBlobMessageMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( decaf::io::IOException ) {
+
+    try {
+
+        ActiveMQBlobMessage* info =
+            dynamic_cast<ActiveMQBlobMessage*>( dataStructure );
+
+        int rc = ActiveMQMessageMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
+
+        return rc + 0;
+    }
+    AMQ_CATCH_RETHROW( decaf::io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException )
+    AMQ_CATCHALL_THROW( decaf::io::IOException )
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void ActiveMQBlobMessageMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( decaf::io::IOException ) {
+
+    try {
+
+        ActiveMQMessageMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+
+        ActiveMQBlobMessage* info =
+            dynamic_cast<ActiveMQBlobMessage*>( dataStructure );
+    }
+    AMQ_CATCH_RETHROW( decaf::io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException )
+    AMQ_CATCHALL_THROW( decaf::io::IOException )
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void ActiveMQBlobMessageMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( decaf::io::IOException ) {
+
+    try {
+
+        ActiveMQMessageMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+        ActiveMQBlobMessage* info =
+            dynamic_cast<ActiveMQBlobMessage*>( dataStructure );
+    }
+    AMQ_CATCH_RETHROW( decaf::io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException )
+    AMQ_CATCHALL_THROW( decaf::io::IOException )
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void ActiveMQBlobMessageMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( decaf::io::IOException ) {
+
+    try {
+
+        ActiveMQBlobMessage* info =
+            dynamic_cast<ActiveMQBlobMessage*>( dataStructure );
+        ActiveMQMessageMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+
+    }
+    AMQ_CATCH_RETHROW( decaf::io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException )
+    AMQ_CATCHALL_THROW( decaf::io::IOException )
+}
+

Added: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ActiveMQBlobMessageMarshaller.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ActiveMQBlobMessageMarshaller.h?rev=685732&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ActiveMQBlobMessageMarshaller.h (added)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ActiveMQBlobMessageMarshaller.h Wed Aug 13 17:06:12 2008
@@ -0,0 +1,127 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V3_ACTIVEMQBLOBMESSAGEMARSHALLER_H_
+#define _ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V3_ACTIVEMQBLOBMESSAGEMARSHALLER_H_
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+#include <activemq/connector/openwire/marshal/v3/ActiveMQMessageMarshaller.h>
+
+#include <decaf/io/DataInputStream.h>
+#include <decaf/io/DataOutputStream.h>
+#include <decaf/io/IOException.h>
+#include <activemq/connector/openwire/OpenWireFormat.h>
+#include <activemq/connector/openwire/commands/DataStructure.h>
+#include <activemq/connector/openwire/utils/BooleanStream.h>
+
+namespace activemq{
+namespace connector{
+namespace openwire{
+namespace marshal{
+namespace v3{
+
+    /**
+     * Marshalling code for Open Wire Format for ActiveMQBlobMessageMarshaller
+     *
+     *  NOTE!: This file is autogenerated - do not modify!
+     *         if you need to make a change, please see the Java Classes
+     *         in the activemq-openwire-generator module
+     */
+    class ActiveMQBlobMessageMarshaller : public ActiveMQMessageMarshaller
+    {
+    public:
+
+        ActiveMQBlobMessageMarshaller() {}
+        virtual ~ActiveMQBlobMessageMarshaller() {}
+
+        /**
+         * Creates a new instance of this marshalable type.
+         * @return new DataStructure object pointer caller owns it.
+         */
+        virtual commands::DataStructure* createObject() const;
+
+        /**
+         * Get the Data Structure Type that identifies this Marshaller
+         * @return byte holding the data structure type value
+         */
+        virtual unsigned char getDataStructureType() const;
+
+        /**
+         * Un-marshal an object instance from the data input stream
+         * @param wireFormat - describs the wire format of the broker
+         * @param o - Object to be un-marshaled
+         * @param dataIn - BinaryReader that provides that data
+         * @param bs - BooleanStream
+         */
+        virtual void tightUnmarshal( OpenWireFormat* wireFormat,
+                                     commands::DataStructure* dataStructure,
+                                     decaf::io::DataInputStream* dataIn,
+                                     utils::BooleanStream* bs ) throw( decaf::io::IOException );
+
+        /**
+         * Write the booleans that this object uses to a BooleanStream
+         * @param wireFormat - describis the wire format of the broker
+         * @param o - Object to be marshaled
+         * @param bs - BooleanStream
+         * @returns int
+         */
+        virtual int tightMarshal1( OpenWireFormat* wireFormat,
+                                   commands::DataStructure* dataStructure,
+                                   utils::BooleanStream* bs ) throw( decaf::io::IOException );
+
+        /**
+         * Write a object instance to data output stream
+         * @param wireFormat - describs the wire format of the broker
+         * @param o - Object to be marshaled
+         * @param dataOut - BinaryReader that provides that data sink
+         * @param bs - BooleanStream
+         */
+        virtual void tightMarshal2( OpenWireFormat* wireFormat,
+                                    commands::DataStructure* dataStructure,
+                                    decaf::io::DataOutputStream* dataOut,
+                                    utils::BooleanStream* bs ) throw( decaf::io::IOException );
+
+        /**
+         * Un-marshal an object instance from the data input stream
+         * @param wireFormat - describs the wire format of the broker
+         * @param o - Object to be marshaled
+         * @param dataIn - BinaryReader that provides that data source
+         */
+        virtual void looseUnmarshal( OpenWireFormat* wireFormat,
+                                     commands::DataStructure* dataStructure,
+                                     decaf::io::DataInputStream* dataIn ) throw( decaf::io::IOException );
+
+        /**
+         * Write a object instance to data output stream
+         * @param wireFormat - describs the wire format of the broker
+         * @param o - Object to be marshaled
+         * @param dataOut - BinaryWriter that provides that data sink
+         */
+        virtual void looseMarshal( OpenWireFormat* wireFormat,
+                                   commands::DataStructure* dataStructure,
+                                   decaf::io::DataOutputStream* dataOut ) throw( decaf::io::IOException );
+
+    };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V3_ACTIVEMQBLOBMESSAGEMARSHALLER_H_*/
+

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/MarshallerFactory.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/MarshallerFactory.cpp?rev=685732&r1=685731&r2=685732&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/MarshallerFactory.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/MarshallerFactory.cpp Wed Aug 13 17:06:12 2008
@@ -15,6 +15,7 @@
  * limitations under the License.
  */
 #include <activemq/connector/openwire/marshal/v3/MarshallerFactory.h>
+#include <activemq/connector/openwire/marshal/v3/ActiveMQBlobMessageMarshaller.h>
 #include <activemq/connector/openwire/marshal/v3/ActiveMQBytesMessageMarshaller.h>
 #include <activemq/connector/openwire/marshal/v3/ActiveMQMapMessageMarshaller.h>
 #include <activemq/connector/openwire/marshal/v3/ActiveMQMessageMarshaller.h>
@@ -91,6 +92,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 void MarshallerFactory::configure( OpenWireFormat* format ) {
 
+    format->addMarshaller( new ActiveMQBlobMessageMarshaller() );
     format->addMarshaller( new ActiveMQBytesMessageMarshaller() );
     format->addMarshaller( new ActiveMQMapMessageMarshaller() );
     format->addMarshaller( new ActiveMQMessageMarshaller() );

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/srcmakefile.mk
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/srcmakefile.mk?rev=685732&r1=685731&r2=685732&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/srcmakefile.mk (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/srcmakefile.mk Wed Aug 13 17:06:12 2008
@@ -16,6 +16,7 @@
 # ---------------------------------------------------------------------------
 
 cc_sources += \
+    activemq/connector/openwire/marshal/v3/ActiveMQBlobMessageMarshaller.cpp \
     activemq/connector/openwire/marshal/v3/ActiveMQBytesMessageMarshaller.cpp \
     activemq/connector/openwire/marshal/v3/ActiveMQDestinationMarshaller.cpp \
     activemq/connector/openwire/marshal/v3/ActiveMQMapMessageMarshaller.cpp \
@@ -79,6 +80,7 @@
     activemq/connector/openwire/marshal/v3/XATransactionIdMarshaller.cpp
 
 h_sources += \
+    activemq/connector/openwire/marshal/v3/ActiveMQBlobMessageMarshaller.h \
     activemq/connector/openwire/marshal/v3/ActiveMQBytesMessageMarshaller.h \
     activemq/connector/openwire/marshal/v3/ActiveMQDestinationMarshaller.h \
     activemq/connector/openwire/marshal/v3/ActiveMQMapMessageMarshaller.h \

Added: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/ActiveMQBlobMessageMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/ActiveMQBlobMessageMarshallerTest.cpp?rev=685732&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/ActiveMQBlobMessageMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/ActiveMQBlobMessageMarshallerTest.cpp Wed Aug 13 17:06:12 2008
@@ -0,0 +1,154 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <activemq/connector/openwire/marshal/v3/ActiveMQBlobMessageMarshallerTest.h>
+
+#include <activemq/connector/openwire/marshal/v3/ActiveMQBlobMessageMarshaller.h>
+#include <activemq/connector/openwire/commands/ActiveMQBlobMessage.h>
+
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::openwire::marshal::v3::ActiveMQBlobMessageMarshallerTest );
+
+#include <activemq/connector/openwire/OpenWireFormat.h>
+#include <activemq/connector/openwire/commands/DataStructure.h>
+#include <activemq/connector/openwire/utils/BooleanStream.h>
+#include <decaf/io/DataInputStream.h>
+#include <decaf/io/DataOutputStream.h>
+#include <decaf/io/IOException.h>
+#include <decaf/io/ByteArrayOutputStream.h>
+#include <decaf/io/ByteArrayInputStream.h>
+#include <decaf/util/Properties.h>
+//
+//     NOTE!: This file is autogenerated - do not modify!
+//            if you need to make a change, please see the Java Classes in the
+//            activemq-core module
+//
+
+using namespace std;
+using namespace activemq;
+using namespace activemq::util;
+using namespace activemq::exceptions;
+using namespace activemq::connector;
+using namespace activemq::connector::openwire;
+using namespace activemq::connector::openwire::commands;
+using namespace activemq::connector::openwire::marshal;
+using namespace activemq::connector::openwire::utils;
+using namespace activemq::connector::openwire::marshal::v3;
+using namespace decaf::io;
+using namespace decaf::lang;
+using namespace decaf::util;
+
+///////////////////////////////////////////////////////////////////////////////
+void ActiveMQBlobMessageMarshallerTest::test() {
+
+    ActiveMQBlobMessageMarshaller myMarshaller;
+    ActiveMQBlobMessage myCommand;
+    ActiveMQBlobMessage* myCommand2;
+
+    CPPUNIT_ASSERT( myMarshaller.getDataStructureType() == myCommand.getDataStructureType() );
+    myCommand2 = dynamic_cast<ActiveMQBlobMessage*>( myMarshaller.createObject() );
+    CPPUNIT_ASSERT( myCommand2 != NULL );
+    delete myCommand2;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void ActiveMQBlobMessageMarshallerTest::testLooseMarshal() {
+
+    ActiveMQBlobMessageMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 3 );
+    openWireFormat.setTightEncodingEnabled( false );
+
+    ActiveMQBlobMessage outCommand;
+    ActiveMQBlobMessage inCommand;
+
+    try {
+
+        // Marshal the dataStructure to a byte array.
+        ByteArrayOutputStream baos;
+        DataOutputStream dataOut( &baos );
+        dataOut.writeByte( outCommand.getDataStructureType() );
+        marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
+
+        // Now read it back in and make sure it's all right.
+        ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+        DataInputStream dataIn( &bais );
+        unsigned char dataType = dataIn.readByte();
+        CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
+        marshaller.looseUnmarshal( &openWireFormat, &inCommand, &dataIn );
+
+        CPPUNIT_ASSERT( inCommand.equals( &outCommand ) == true );
+
+    } catch( ActiveMQException& e ) {
+        e.printStackTrace();
+        CPPUNIT_ASSERT( false );
+    } catch( ... ) {
+        CPPUNIT_ASSERT( false );
+    }
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void ActiveMQBlobMessageMarshallerTest::testTightMarshal() {
+
+    ActiveMQBlobMessageMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 3 );
+    openWireFormat.setTightEncodingEnabled( true );
+
+    ActiveMQBlobMessage outCommand;
+    ActiveMQBlobMessage inCommand;
+
+    try {
+
+        // Marshal the dataStructure to a byte array.
+        ByteArrayOutputStream baos;
+        DataOutputStream dataOut( &baos );
+        // Phase 1 - count the size
+        int size = 1;
+        BooleanStream bs;
+        size += marshaller.tightMarshal1( &openWireFormat, &outCommand, &bs );
+        size += bs.marshalledSize();
+        // Phase 2 - marshal
+        dataOut.writeByte( outCommand.getDataStructureType() );
+        bs.marshal( &dataOut );
+        marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
+
+        // Now read it back in and make sure it's all right.
+        ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+        DataInputStream dataIn( &bais );
+
+        unsigned char dataType = dataIn.readByte();
+        CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
+        bs.clear();
+        bs.unmarshal( &dataIn );
+        marshaller.tightUnmarshal( &openWireFormat, &inCommand, &dataIn, &bs );
+
+        CPPUNIT_ASSERT( inCommand.equals( &outCommand ) == true );
+
+    } catch( ActiveMQException& e ) {
+        e.printStackTrace();
+        CPPUNIT_ASSERT( false );
+    } catch( ... ) {
+        CPPUNIT_ASSERT( false );
+    }
+}
+

Added: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/ActiveMQBlobMessageMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/ActiveMQBlobMessageMarshallerTest.h?rev=685732&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/ActiveMQBlobMessageMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/ActiveMQBlobMessageMarshallerTest.h Wed Aug 13 17:06:12 2008
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V3_ACTIVEMQBLOBMESSAGEMARSHALLERTEST_H_
+#define _ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V3_ACTIVEMQBLOBMESSAGEMARSHALLERTEST_H_
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+namespace activemq{
+namespace connector{
+namespace openwire{
+namespace marshal{
+namespace v3{
+
+    /**
+     * Marshalling Test code for Open Wire Format for ActiveMQBlobMessageMarshallerTest
+     *
+     *  NOTE!: This file is autogenerated - do not modify!
+     *         if you need to make a change, please see the Java Classes
+     *         in the activemq-openwire-generator module
+     */
+    class ActiveMQBlobMessageMarshallerTest : public CppUnit::TestFixture {
+
+        CPPUNIT_TEST_SUITE( ActiveMQBlobMessageMarshallerTest );
+        CPPUNIT_TEST( test );
+        CPPUNIT_TEST( testLooseMarshal );
+        CPPUNIT_TEST( testTightMarshal );
+        CPPUNIT_TEST_SUITE_END();
+
+    public:
+
+        ActiveMQBlobMessageMarshallerTest() {}
+        virtual ~ActiveMQBlobMessageMarshallerTest() {}
+
+        /**
+         * Test the marshaller and its marshalled type.
+         */
+        virtual void test();
+        virtual void testLooseMarshal();
+        virtual void testTightMarshal();
+
+    };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V3_ACTIVEMQBLOBMESSAGEMARSHALLERTEST_H_*/
+

Modified: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/srcmakefile.mk
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/srcmakefile.mk?rev=685732&r1=685731&r2=685732&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/srcmakefile.mk (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v3/srcmakefile.mk Wed Aug 13 17:06:12 2008
@@ -16,6 +16,7 @@
 # ---------------------------------------------------------------------------
 
 cc_sources += \
+    activemq/connector/openwire/marshal/v3/ActiveMQBlobMessageMarshallerTest.cpp \
     activemq/connector/openwire/marshal/v3/ActiveMQBytesMessageMarshallerTest.cpp \
     activemq/connector/openwire/marshal/v3/ActiveMQMapMessageMarshallerTest.cpp \
     activemq/connector/openwire/marshal/v3/ActiveMQMessageMarshallerTest.cpp \
@@ -73,6 +74,7 @@
     activemq/connector/openwire/marshal/v3/XATransactionIdMarshallerTest.cpp
 
 h_sources += \
+    activemq/connector/openwire/marshal/v3/ActiveMQBlobMessageMarshallerTest.h \
     activemq/connector/openwire/marshal/v3/ActiveMQBytesMessageMarshallerTest.h \
     activemq/connector/openwire/marshal/v3/ActiveMQMapMessageMarshallerTest.h \
     activemq/connector/openwire/marshal/v3/ActiveMQMessageMarshallerTest.h \