You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by nm...@apache.org on 2006/05/15 15:39:33 UTC

svn commit: r406628 [1/10] - in /incubator/activemq/trunk/openwire-cpp: ./ src/gram/java/org/apache/activemq/openwire/tool/ src/gram/script/ src/main/cpp/activemq/ src/main/cpp/activemq/command/ src/main/cpp/activemq/protocol/ src/main/cpp/activemq/pro...

Author: nmittler
Date: Mon May 15 06:38:57 2006
New Revision: 406628

URL: http://svn.apache.org/viewcvs?rev=406628&view=rev
Log:
applying updates for JIRA issue AMQ-656 (attachment source_060515.zip)

Added:
    incubator/activemq/trunk/openwire-cpp/README.txt
    incubator/activemq/trunk/openwire-cpp/src/gram/java/org/apache/activemq/openwire/tool/OpenWireCppClassesScript.java
    incubator/activemq/trunk/openwire-cpp/src/gram/java/org/apache/activemq/openwire/tool/OpenWireCppHeadersScript.java
    incubator/activemq/trunk/openwire-cpp/src/gram/script/GenerateCppClasses.groovy
    incubator/activemq/trunk/openwire-cpp/src/gram/script/GenerateCppHeaders.groovy
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/BaseDataStructure.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/BaseDataStructure.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ConnectionControl.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ConnectionControl.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ConsumerControl.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ConsumerControl.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/LastPartialCommand.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/LastPartialCommand.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/NetworkBridgeFilter.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/NetworkBridgeFilter.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/PartialCommand.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/PartialCommand.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ReplayCommand.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ReplayCommand.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/BufferedInputStream.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/BufferedInputStream.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/BufferedOutputStream.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/BufferedOutputStream.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/encoding/
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/encoding/AsciiToUTF8Encoder.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/encoding/AsciiToUTF8Encoder.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/encoding/CharsetEncoderRegistry.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/encoding/CharsetEncoderRegistry.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/encoding/ICharsetEncoder.hpp
    incubator/activemq/trunk/openwire-cpp/src/test/cpp/IUnitTest.hpp
    incubator/activemq/trunk/openwire-cpp/src/test/cpp/TestAsynchQueue.cpp
    incubator/activemq/trunk/openwire-cpp/src/test/cpp/TestAsynchQueue.hpp
    incubator/activemq/trunk/openwire-cpp/src/test/cpp/TestAsynchTopic.cpp
    incubator/activemq/trunk/openwire-cpp/src/test/cpp/TestAsynchTopic.hpp
    incubator/activemq/trunk/openwire-cpp/src/test/cpp/TestLocalTXCommit.cpp
    incubator/activemq/trunk/openwire-cpp/src/test/cpp/TestLocalTXCommit.hpp
    incubator/activemq/trunk/openwire-cpp/src/test/cpp/TestSuite.cpp
    incubator/activemq/trunk/openwire-cpp/src/test/cpp/TestSuite.hpp
    incubator/activemq/trunk/openwire-cpp/src/test/cpp/TestSynchQueue.cpp
    incubator/activemq/trunk/openwire-cpp/src/test/cpp/TestSynchQueue.hpp
Removed:
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/AbstractCommand.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/AbstractCommand.hpp
    incubator/activemq/trunk/openwire-cpp/src/test/cpp/TestListener.cpp
    incubator/activemq/trunk/openwire-cpp/src/test/cpp/TestListener.hpp
    incubator/activemq/trunk/openwire-cpp/src/test/cpp/TestMain.cpp
Modified:
    incubator/activemq/trunk/openwire-cpp/activemq-cpp.vcproj
    incubator/activemq/trunk/openwire-cpp/activemq-test.vcproj
    incubator/activemq/trunk/openwire-cpp/makefile
    incubator/activemq/trunk/openwire-cpp/makefile-linux-debug.cfg
    incubator/activemq/trunk/openwire-cpp/makefile-linux-release.cfg
    incubator/activemq/trunk/openwire-cpp/makefile-macosx-debug.cfg
    incubator/activemq/trunk/openwire-cpp/makefile-macosx-release.cfg
    incubator/activemq/trunk/openwire-cpp/makefile.cfg
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/Connection.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/Connection.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/ConnectionFactory.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/ICommand.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/IDataStructure.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/MessageConsumer.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/Session.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/Session.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQBytesMessage.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQBytesMessage.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQDestination.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQDestination.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQMapMessage.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQMapMessage.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQMessage.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQMessage.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQTextMessage.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQTextMessage.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/BaseCommand.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/BaseCommand.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/BrokerError.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/BrokerId.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/BrokerId.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/BrokerInfo.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/BrokerInfo.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ConnectionError.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ConnectionError.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ConnectionId.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ConnectionId.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ConnectionInfo.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ConnectionInfo.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ConsumerId.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ConsumerId.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ConsumerInfo.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ConsumerInfo.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ControlCommand.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ControlCommand.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/DataArrayResponse.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/DataArrayResponse.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/DataResponse.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/DataResponse.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/DestinationInfo.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/DestinationInfo.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/DiscoveryEvent.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/DiscoveryEvent.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ExceptionResponse.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ExceptionResponse.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/FlushCommand.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/FlushCommand.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/IntegerResponse.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/IntegerResponse.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/JournalQueueAck.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/JournalQueueAck.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/JournalTopicAck.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/JournalTopicAck.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/JournalTrace.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/JournalTrace.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/JournalTransaction.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/JournalTransaction.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/KeepAliveInfo.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/KeepAliveInfo.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/LocalTransactionId.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/LocalTransactionId.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/Message.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/Message.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/MessageAck.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/MessageAck.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/MessageDispatch.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/MessageDispatch.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/MessageDispatchNotification.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/MessageDispatchNotification.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/MessageId.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/MessageId.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ProducerId.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ProducerId.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ProducerInfo.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ProducerInfo.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/RemoveInfo.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/RemoveInfo.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/RemoveSubscriptionInfo.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/RemoveSubscriptionInfo.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/Response.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/Response.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/SessionId.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/SessionId.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/SessionInfo.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/SessionInfo.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ShutdownInfo.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ShutdownInfo.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/SubscriptionInfo.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/SubscriptionInfo.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/TransactionId.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/TransactionId.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/TransactionInfo.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/TransactionInfo.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/WireFormatInfo.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/XATransactionId.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/XATransactionId.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/protocol/IMarshaller.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/protocol/IProtocol.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/protocol/openwire/OpenWireMarshaller.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/protocol/openwire/OpenWireMarshaller.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/protocol/openwire/OpenWireProtocol.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/protocol/openwire/OpenWireProtocol.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/transport/CorrelatorFilter.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/transport/CorrelatorFilter.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/transport/ICommandListener.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/transport/ITransport.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/transport/LoggingFilter.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/transport/LoggingFilter.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/transport/MutexFilter.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/transport/MutexFilter.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/transport/TransportFactory.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/transport/TransportFactory.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/transport/TransportFilter.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/transport/TransportFilter.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/transport/tcp/TcpTransport.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/transport/tcp/TcpTransport.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/cms/IBytesMessage.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/cms/IMapMessage.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/ByteArrayInputStream.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/ByteArrayOutputStream.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/DataInputStream.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/DataInputStream.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/DataOutputStream.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/DataOutputStream.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/IInputStream.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/IOutputStream.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/SocketInputStream.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/SocketInputStream.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/SocketOutputStream.cpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/SocketOutputStream.hpp
    incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/util/Hex.cpp

Added: incubator/activemq/trunk/openwire-cpp/README.txt
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/README.txt?rev=406628&view=auto
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/README.txt (added)
+++ incubator/activemq/trunk/openwire-cpp/README.txt Mon May 15 06:38:57 2006
@@ -0,0 +1,48 @@
+Apache ActiveMQ C++ Client
+==========================
+
+
+The ActiveMQ C++ client has support for both synchrounous and asynchrounous messaging as well as local transactions and more. To ease programming it uses smart pointers and STL extensively. For more information see included test programs.
+
+
+How to build
+============
+To run the supplied makefiles you need to set two environment variables, CONFIG and OSTYPE. With the help of variables the makefiles can determine what settings needs to be set for your platform.
+
+CONFIG can be set to either "debug" or "release" depending on what type of output you want. OSTYPE is set to "linux" or "macosx".
+
+For Windows, use the Visual Studio 2005 project files.
+
+
+Connection URI
+==============
+To connect to the ActiveMQ broker a URI is specified. The URI may have a set of configuration parameters that are used to configure the client.
+
+Sample URI: "tcp://192.168.64.142:61616?trace=false&protocol=openwire&encoding=none"
+
+Scheme
+------
+Name......: tcp
+Desciption: Type of transport protocol
+Mandatory.: Yes
+
+Parameters
+----------
+Name......: protocol
+Desciption: Type of wire protocol
+Default...: "openwire"
+Values....: "openwire"
+Mandatory.: No
+
+Name......: encoding
+Desciption: Character encoding
+Default...: "AsciiToUTF8"
+Values....: "none", "AsciiToUTF8"
+Mandatory.: No
+
+Name......: trace
+Desciption: Enables debug output to console
+Default...: "false"
+Values....: "true", "false"
+Mandatory.: No
+

Modified: incubator/activemq/trunk/openwire-cpp/activemq-cpp.vcproj
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/activemq-cpp.vcproj?rev=406628&r1=406627&r2=406628&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/activemq-cpp.vcproj (original)
+++ incubator/activemq/trunk/openwire-cpp/activemq-cpp.vcproj Mon May 15 06:38:57 2006
@@ -46,6 +46,7 @@
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
+				ProgramDataBaseFileName="$(IntDir)\amqlib.pdb"
 				WarningLevel="4"
 				Detect64BitPortabilityProblems="true"
 				DebugInformationFormat="4"
@@ -108,6 +109,7 @@
 				PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
+				ProgramDataBaseFileName="$(IntDir)\amqlib.pdb"
 				WarningLevel="3"
 				Detect64BitPortabilityProblems="true"
 				DebugInformationFormat="3"
@@ -179,6 +181,14 @@
 					>
 				</File>
 				<File
+					RelativePath=".\src\main\cpp\activemq\command\ConnectionControl.cpp"
+					>
+				</File>
+				<File
+					RelativePath=".\src\main\cpp\activemq\command\ConnectionControl.hpp"
+					>
+				</File>
+				<File
 					RelativePath=".\src\main\cpp\activemq\ConnectionException.hpp"
 					>
 				</File>
@@ -199,6 +209,14 @@
 					>
 				</File>
 				<File
+					RelativePath=".\src\main\cpp\activemq\command\ConsumerControl.cpp"
+					>
+				</File>
+				<File
+					RelativePath=".\src\main\cpp\activemq\command\ConsumerControl.hpp"
+					>
+				</File>
+				<File
 					RelativePath=".\src\main\cpp\activemq\DestinationFilter.cpp"
 					>
 				</File>
@@ -282,14 +300,6 @@
 					Name="command"
 					>
 					<File
-						RelativePath=".\src\main\cpp\activemq\command\AbstractCommand.cpp"
-						>
-					</File>
-					<File
-						RelativePath=".\src\main\cpp\activemq\command\AbstractCommand.hpp"
-						>
-					</File>
-					<File
 						RelativePath=".\src\main\cpp\activemq\command\ActiveMQBytesMessage.cpp"
 						>
 					</File>
@@ -394,6 +404,14 @@
 						>
 					</File>
 					<File
+						RelativePath=".\src\main\cpp\activemq\command\BaseDataStructure.cpp"
+						>
+					</File>
+					<File
+						RelativePath=".\src\main\cpp\activemq\command\BaseDataStructure.hpp"
+						>
+					</File>
+					<File
 						RelativePath=".\src\main\cpp\activemq\command\BooleanExpression.hpp"
 						>
 					</File>
@@ -566,6 +584,14 @@
 						>
 					</File>
 					<File
+						RelativePath=".\src\main\cpp\activemq\command\LastPartialCommand.cpp"
+						>
+					</File>
+					<File
+						RelativePath=".\src\main\cpp\activemq\command\LastPartialCommand.hpp"
+						>
+					</File>
+					<File
 						RelativePath=".\src\main\cpp\activemq\command\LocalTransactionId.cpp"
 						>
 					</File>
@@ -614,6 +640,22 @@
 						>
 					</File>
 					<File
+						RelativePath=".\src\main\cpp\activemq\command\NetworkBridgeFilter.cpp"
+						>
+					</File>
+					<File
+						RelativePath=".\src\main\cpp\activemq\command\NetworkBridgeFilter.hpp"
+						>
+					</File>
+					<File
+						RelativePath=".\src\main\cpp\activemq\command\PartialCommand.cpp"
+						>
+					</File>
+					<File
+						RelativePath=".\src\main\cpp\activemq\command\PartialCommand.hpp"
+						>
+					</File>
+					<File
 						RelativePath=".\src\main\cpp\activemq\command\ProducerId.cpp"
 						>
 					</File>
@@ -646,6 +688,14 @@
 						>
 					</File>
 					<File
+						RelativePath=".\src\main\cpp\activemq\command\ReplayCommand.cpp"
+						>
+					</File>
+					<File
+						RelativePath=".\src\main\cpp\activemq\command\ReplayCommand.hpp"
+						>
+					</File>
+					<File
 						RelativePath=".\src\main\cpp\activemq\command\Response.cpp"
 						>
 					</File>
@@ -950,6 +1000,22 @@
 					Name="io"
 					>
 					<File
+						RelativePath=".\src\main\cpp\ppr\io\BufferedInputStream.cpp"
+						>
+					</File>
+					<File
+						RelativePath=".\src\main\cpp\ppr\io\BufferedInputStream.hpp"
+						>
+					</File>
+					<File
+						RelativePath=".\src\main\cpp\ppr\io\BufferedOutputStream.cpp"
+						>
+					</File>
+					<File
+						RelativePath=".\src\main\cpp\ppr\io\BufferedOutputStream.hpp"
+						>
+					</File>
+					<File
 						RelativePath=".\src\main\cpp\ppr\io\ByteArrayInputStream.cpp"
 						>
 					</File>
@@ -1013,6 +1079,30 @@
 						RelativePath=".\src\main\cpp\ppr\io\SocketOutputStream.hpp"
 						>
 					</File>
+					<Filter
+						Name="encoding"
+						>
+						<File
+							RelativePath=".\src\main\cpp\ppr\io\encoding\AsciiToUTF8Encoder.cpp"
+							>
+						</File>
+						<File
+							RelativePath=".\src\main\cpp\ppr\io\encoding\AsciiToUTF8Encoder.hpp"
+							>
+						</File>
+						<File
+							RelativePath=".\src\main\cpp\ppr\io\encoding\CharsetEncoderRegistry.cpp"
+							>
+						</File>
+						<File
+							RelativePath=".\src\main\cpp\ppr\io\encoding\CharsetEncoderRegistry.hpp"
+							>
+						</File>
+						<File
+							RelativePath=".\src\main\cpp\ppr\io\encoding\ICharsetEncoder.hpp"
+							>
+						</File>
+					</Filter>
 				</Filter>
 				<Filter
 					Name="net"

Modified: incubator/activemq/trunk/openwire-cpp/activemq-test.vcproj
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/activemq-test.vcproj?rev=406628&r1=406627&r2=406628&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/activemq-test.vcproj (original)
+++ incubator/activemq/trunk/openwire-cpp/activemq-test.vcproj Mon May 15 06:38:57 2006
@@ -47,6 +47,7 @@
 				SmallerTypeCheck="true"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
+				ProgramDataBaseFileName="$(IntDir)\test.pdb"
 				WarningLevel="3"
 				Detect64BitPortabilityProblems="true"
 				DebugInformationFormat="4"
@@ -122,6 +123,7 @@
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="2"
+				ProgramDataBaseFileName="$(IntDir)\test.pdb"
 				WarningLevel="3"
 				Detect64BitPortabilityProblems="true"
 				DebugInformationFormat="3"
@@ -179,15 +181,47 @@
 			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
 			>
 			<File
-				RelativePath=".\src\test\cpp\TestListener.cpp"
+				RelativePath=".\src\test\cpp\IUnitTest.hpp"
 				>
 			</File>
 			<File
-				RelativePath=".\src\test\cpp\TestListener.hpp"
+				RelativePath=".\src\test\cpp\TestAsynchQueue.cpp"
 				>
 			</File>
 			<File
-				RelativePath=".\src\test\cpp\TestMain.cpp"
+				RelativePath=".\src\test\cpp\TestAsynchQueue.hpp"
+				>
+			</File>
+			<File
+				RelativePath=".\src\test\cpp\TestAsynchTopic.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\src\test\cpp\TestAsynchTopic.hpp"
+				>
+			</File>
+			<File
+				RelativePath=".\src\test\cpp\TestLocalTXCommit.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\src\test\cpp\TestLocalTXCommit.hpp"
+				>
+			</File>
+			<File
+				RelativePath=".\src\test\cpp\TestSuite.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\src\test\cpp\TestSuite.hpp"
+				>
+			</File>
+			<File
+				RelativePath=".\src\test\cpp\TestSynchQueue.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\src\test\cpp\TestSynchQueue.hpp"
 				>
 			</File>
 		</Filter>

Modified: incubator/activemq/trunk/openwire-cpp/makefile
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/makefile?rev=406628&r1=406627&r2=406628&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/makefile (original)
+++ incubator/activemq/trunk/openwire-cpp/makefile Mon May 15 06:38:57 2006
@@ -1,5 +1,6 @@
 SRCDIR = src/main/cpp
-MAKESUPPORT_HOME = $(PWD)
+TSTDIR = src/test/cpp
+MAKE_HOME = $(PWD)
 
 LIBOFILES = \
 	$(OUTDIR)/activemq/BrokerException.o \
@@ -15,7 +16,6 @@
 	$(OUTDIR)/activemq/Session.o \
 	$(OUTDIR)/activemq/TransactionContext.o \
 	\
-	$(OUTDIR)/activemq/command/AbstractCommand.o \
 	$(OUTDIR)/activemq/command/ActiveMQBytesMessage.o \
 	$(OUTDIR)/activemq/command/ActiveMQDestination.o \
 	$(OUTDIR)/activemq/command/ActiveMQMapMessage.o \
@@ -23,17 +23,21 @@
 	$(OUTDIR)/activemq/command/ActiveMQObjectMessage.o \
 	$(OUTDIR)/activemq/command/ActiveMQQueue.o \
 	$(OUTDIR)/activemq/command/ActiveMQStreamMessage.o \
+	$(OUTDIR)/activemq/command/ActiveMQTempDestination.o \
 	$(OUTDIR)/activemq/command/ActiveMQTempQueue.o \
 	$(OUTDIR)/activemq/command/ActiveMQTempTopic.o \
 	$(OUTDIR)/activemq/command/ActiveMQTextMessage.o \
 	$(OUTDIR)/activemq/command/ActiveMQTopic.o \
+	$(OUTDIR)/activemq/command/BaseDataStructure.o \
 	$(OUTDIR)/activemq/command/BaseCommand.o \
 	$(OUTDIR)/activemq/command/BrokerError.o \
 	$(OUTDIR)/activemq/command/BrokerId.o \
 	$(OUTDIR)/activemq/command/BrokerInfo.o \
+	$(OUTDIR)/activemq/command/ConnectionControl.o \
 	$(OUTDIR)/activemq/command/ConnectionError.o \
 	$(OUTDIR)/activemq/command/ConnectionId.o \
 	$(OUTDIR)/activemq/command/ConnectionInfo.o \
+	$(OUTDIR)/activemq/command/ConsumerControl.o \
 	$(OUTDIR)/activemq/command/ConsumerId.o \
 	$(OUTDIR)/activemq/command/ConsumerInfo.o \
 	$(OUTDIR)/activemq/command/ControlCommand.o \
@@ -49,16 +53,20 @@
 	$(OUTDIR)/activemq/command/JournalTrace.o \
 	$(OUTDIR)/activemq/command/JournalTransaction.o \
 	$(OUTDIR)/activemq/command/KeepAliveInfo.o \
+	$(OUTDIR)/activemq/command/LastPartialCommand.o \
 	$(OUTDIR)/activemq/command/LocalTransactionId.o \
 	$(OUTDIR)/activemq/command/Message.o \
 	$(OUTDIR)/activemq/command/MessageAck.o \
 	$(OUTDIR)/activemq/command/MessageDispatch.o \
 	$(OUTDIR)/activemq/command/MessageDispatchNotification.o \
 	$(OUTDIR)/activemq/command/MessageId.o \
+	$(OUTDIR)/activemq/command/NetworkBridgeFilter.o \
+	$(OUTDIR)/activemq/command/PartialCommand.o \
 	$(OUTDIR)/activemq/command/ProducerId.o \
 	$(OUTDIR)/activemq/command/ProducerInfo.o \
 	$(OUTDIR)/activemq/command/RemoveInfo.o \
 	$(OUTDIR)/activemq/command/RemoveSubscriptionInfo.o \
+	$(OUTDIR)/activemq/command/ReplayCommand.o \
 	$(OUTDIR)/activemq/command/Response.o \
 	$(OUTDIR)/activemq/command/SessionId.o \
 	$(OUTDIR)/activemq/command/SessionInfo.o \
@@ -68,7 +76,6 @@
 	$(OUTDIR)/activemq/command/TransactionInfo.o \
 	$(OUTDIR)/activemq/command/WireFormatInfo.o \
 	$(OUTDIR)/activemq/command/XATransactionId.o \
-	$(OUTDIR)/activemq/command/ActiveMQTempDestination.o \
 	\
 	$(OUTDIR)/activemq/protocol/openwire/OpenWireMarshaller.o \
 	$(OUTDIR)/activemq/protocol/openwire/OpenWireProtocol.o \
@@ -84,6 +91,10 @@
 	\
 	$(OUTDIR)/cms/CmsException.o \
 	\
+	$(OUTDIR)/ppr/io/encoding/AsciiToUTF8Encoder.o \
+	$(OUTDIR)/ppr/io/encoding/CharsetEncoderRegistry.o \
+	$(OUTDIR)/ppr/io/BufferedInputStream.o \
+	$(OUTDIR)/ppr/io/BufferedOutputStream.o \
 	$(OUTDIR)/ppr/io/ByteArrayInputStream.o \
 	$(OUTDIR)/ppr/io/ByteArrayOutputStream.o \
 	$(OUTDIR)/ppr/io/DataInputStream.o \
@@ -106,12 +117,16 @@
 OUTLIB = $(OUTDIR)/libactivemq.a
 
 EXEOFILES = \
-	$(OUTDIR)/TestMain.o \
-	$(OUTDIR)/TestListener.o \
+	$(OUTDIR)/TestSuite.o \
+	$(OUTDIR)/TestSynchQueue.o \
+	$(OUTDIR)/TestAsynchQueue.o \
+	$(OUTDIR)/TestAsynchTopic.o \
+	$(OUTDIR)/TestLocalTXCommit.o \
 
 EXELIBS = -lactivemq -lpthread -lstdc++
+OUTEXE  = $(OUTDIR)/test
 
 DEFINES          =
 
-include $(MAKESUPPORT_HOME)/makefile.cfg
+include $(MAKE_HOME)/makefile.cfg
 

Modified: incubator/activemq/trunk/openwire-cpp/makefile-linux-debug.cfg
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/makefile-linux-debug.cfg?rev=406628&r1=406627&r2=406628&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/makefile-linux-debug.cfg (original)
+++ incubator/activemq/trunk/openwire-cpp/makefile-linux-debug.cfg Mon May 15 06:38:57 2006
@@ -9,6 +9,6 @@
 LD               = g++ -g -frtti -pthread
 CCFLAGS          = -Wall
 LDFLAGS          = -luuid
-OUTDIR           = $(MAKESUPPORT_HOME)/out
+OUTDIR           = $(MAKE_HOME)/out
 ARFLAGS		 = 
 

Modified: incubator/activemq/trunk/openwire-cpp/makefile-linux-release.cfg
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/makefile-linux-release.cfg?rev=406628&r1=406627&r2=406628&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/makefile-linux-release.cfg (original)
+++ incubator/activemq/trunk/openwire-cpp/makefile-linux-release.cfg Mon May 15 06:38:57 2006
@@ -9,7 +9,7 @@
 LD               = g++ -frtti -pthread 
 CCFLAGS          = -Wall
 LDFLAGS          = -luuid
-OUTDIR           = $(MAKESUPPORT_HOME)/out
+OUTDIR           = $(MAKE_HOME)/out
 ARFLAGS		 = 
 
 

Modified: incubator/activemq/trunk/openwire-cpp/makefile-macosx-debug.cfg
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/makefile-macosx-debug.cfg?rev=406628&r1=406627&r2=406628&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/makefile-macosx-debug.cfg (original)
+++ incubator/activemq/trunk/openwire-cpp/makefile-macosx-debug.cfg Mon May 15 06:38:57 2006
@@ -9,6 +9,6 @@
 LD               = g++ -g -frtti
 CCFLAGS          = -Wall
 LDFLAGS          = -lpthread
-OUTDIR           = $(MAKESUPPORT_HOME)/out
+OUTDIR           = $(MAKE_HOME)/out
 ARFLAGS		 = 
 

Modified: incubator/activemq/trunk/openwire-cpp/makefile-macosx-release.cfg
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/makefile-macosx-release.cfg?rev=406628&r1=406627&r2=406628&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/makefile-macosx-release.cfg (original)
+++ incubator/activemq/trunk/openwire-cpp/makefile-macosx-release.cfg Mon May 15 06:38:57 2006
@@ -9,7 +9,7 @@
 LD               = g++ -frtti
 CCFLAGS          = -Wall
 LDFLAGS          = -lpthread
-OUTDIR           = $(MAKESUPPORT_HOME)/out
+OUTDIR           = $(MAKE_HOME)/out
 ARFLAGS		 = 
 
 

Modified: incubator/activemq/trunk/openwire-cpp/makefile.cfg
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/makefile.cfg?rev=406628&r1=406627&r2=406628&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/makefile.cfg (original)
+++ incubator/activemq/trunk/openwire-cpp/makefile.cfg Mon May 15 06:38:57 2006
@@ -3,7 +3,7 @@
 # --- select compiler for structure
 # ----------------------------------------------------------
 
-include $(MAKESUPPORT_HOME)/makefile-$(OSTYPE)-$(CONFIG).cfg
+include $(MAKE_HOME)/makefile-$(OSTYPE)-$(CONFIG).cfg
 
 # --- set generic commmands
 # ----------------------------------------------------------
@@ -46,6 +46,11 @@
 	$(CC) -o $@ $(DEFINES) $(CCFLAGS) -I$(SRCDIR) \
 	$(LOCAL_INCLUDE) -c $<
 
+$(OUTDIR)/%.o: $(TSTDIR)/%.cpp $(TSTDIR)/%.hpp
+	$(ECHO) "    - "$(CC) "'"$<"'"
+	$(CC) -o $@ $(DEFINES) $(CCFLAGS) -I$(SRCDIR) -I$(TSTDIR) \
+	$(LOCAL_INCLUDE) -c $<
+
 # --- set generic targets and their handling procedures
 # ----------------------------------------------------------
 
@@ -53,28 +58,32 @@
 
 default: \
 	prepare \
-	$(LIBOFILES) \
 	$(OUTLIB) \
 	postpare
 
+test: \
+	prepare \
+	$(OUTEXE) \
+	postpare
+
+
 $(OUTLIB): $(LIBOFILES) $(DEPLIBS)
 	$(ECHO) "    - Creating static library file "$@
 	$(AR) $(ARFLAGS) $@ $(LIBOFILES)
 
-test: $(OUTLIB)
-	$(ECHO) "    - Creating test executable"
-	$(CC) $(CFLAGS) -I$(SRCDIR) -c $(SRCDIR)/../../test/cpp/TestMain.cpp $(OBJS) -o $(OUTDIR)/TestMain.o
-	$(CC) $(CFLAGS) -I$(SRCDIR) -c $(SRCDIR)/../../test/cpp/TestListener.cpp $(OBJS) -o $(OUTDIR)/TestListener.o
-	$(LD) $(LDFLAGS) -o $(OUTDIR)/$@ -L$(OUTDIR) $(EXEOFILES) $(EXELIBS)
+$(OUTEXE): $(OUTLIB) $(EXEOFILES)
+	$(ECHO) "    - Creating test executable file "$(OUTEXE)
+	$(LD) $(LDFLAGS) -o $@ -L$(OUTDIR) $(EXEOFILES) $(EXELIBS)
 
 clean:
 	$(ECHO) "    - Cleaning up local directory "$(CURRENT)
 	$(ECHO) "    - Removing object files"
 	$(RM) $(LIBOFILES)
+	$(RM) $(EXEOFILES)
 	$(ECHO) "    - Removing file "$(OUTLIB)
 	$(RM) $(OUTLIB)
-	$(ECHO) "    - Removing file "$(TESTMAIN)
-	$(RM) $(OUTDIR)/test
+	$(ECHO) "    - Removing file "$(OUTEXE)
+	$(RM) $(OUTEXE)
 	$(RM) *~ *%
 	$(RM) #*
 	$(RM) core
@@ -93,6 +102,7 @@
 	     $(MD) $(OUTDIR)/cms; \
 	     $(MD) $(OUTDIR)/ppr; \
 	     $(MD) $(OUTDIR)/ppr/io; \
+	     $(MD) $(OUTDIR)/ppr/io/encoding; \
 	     $(MD) $(OUTDIR)/ppr/net; \
 	     $(MD) $(OUTDIR)/ppr/thread; \
 	     $(MD) $(OUTDIR)/ppr/util; \

Added: incubator/activemq/trunk/openwire-cpp/src/gram/java/org/apache/activemq/openwire/tool/OpenWireCppClassesScript.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/gram/java/org/apache/activemq/openwire/tool/OpenWireCppClassesScript.java?rev=406628&view=auto
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/gram/java/org/apache/activemq/openwire/tool/OpenWireCppClassesScript.java (added)
+++ incubator/activemq/trunk/openwire-cpp/src/gram/java/org/apache/activemq/openwire/tool/OpenWireCppClassesScript.java Mon May 15 06:38:57 2006
@@ -0,0 +1,209 @@
+/*
+ *
+ * Copyright 2005-2006 The Apache Software Foundation
+ *
+ * Licensed 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.
+ */
+package org.apache.activemq.openwire.tool;
+
+import org.codehaus.jam.JClass;
+
+import java.io.File;
+
+/**
+ * 
+ * @version $Revision: 379824 $
+ */
+public abstract class OpenWireCppClassesScript extends OpenWireClassesScript {
+
+    public Object run() {
+        filePostFix = getFilePostFix();
+        if (destDir == null) {
+            destDir = new File("../openwire-cpp/src/main/cpp/activemq/command");
+        }
+        return super.run();
+    }
+
+    protected String getFilePostFix() {
+        return ".cpp";
+    }
+
+    /**
+     * Converts the Java type to a C++ type name
+     */
+    public String toCppType(JClass type) {
+        String name = type.getSimpleName();
+        if (name.equals("String")) {
+            return "p<string>";
+        }
+        else if (type.isArrayType()) {
+		if( name.equals("byte[]") )
+                name = "char[]" ;
+		else if( name.equals("DataStructure[]") )
+                name = "IDataStructure[]" ;
+
+            return "array<" + name.substring(0, name.length()-2) + ">";
+        }
+        else if (name.equals("Throwable") || name.equals("Exception")) {
+            return "p<BrokerError>";
+        }
+        else if (name.equals("ByteSequence")) {
+            return "array<char>";
+        }
+        else if (name.equals("boolean")) {
+            return "bool";
+        }
+        else if (name.equals("long")) {
+            return "long long";
+        }
+        else if (name.equals("byte")) {
+            return "char";
+        }
+        else if( name.equals("Command") || name.equals("DataStructure") ) {
+            return "p<I" + name + ">" ;
+        }
+        else if( !type.isPrimitiveType() ) {
+            return "p<" + name + ">" ;
+        }
+        else {
+            return name ;
+        }
+    }
+
+    /**
+     * Converts the Java type to a C++ default value
+     */
+    public String toCppDefaultValue(JClass type) {
+        String name = type.getSimpleName();
+
+        if ( name.equals("boolean") ) {
+            return "false";
+        }
+        else if (!type.isPrimitiveType()) {
+            return "NULL";
+        }
+        else {
+            return "0";
+        }
+    }
+
+    /**
+     * Converts the Java type to the name of the C++ marshal method
+     * to be used
+     */
+    public String toMarshalMethodName(JClass type) {
+        String name = type.getSimpleName();
+        if (name.equals("String")) {
+            return "marshalString";
+        }
+        else if (type.isArrayType()) {
+            if ( type.getArrayComponentType().isPrimitiveType() && name.equals("byte[]") )
+                return "marshalByteArray" ;
+            else
+                return "marshalObjectArray" ;
+        }
+        else if ( name.equals("ByteSequence") ) {
+            return "marshalByteArray";
+        }
+        else if (name.equals("short") ) {
+            return "marshalShort";
+        }
+        else if (name.equals("int") ) {
+            return "marshalInt";
+        }
+        else if (name.equals("long") ) {
+            return "marshalLong";
+        }
+        else if (name.equals("byte")) {
+            return "marshalByte";
+        }
+        else if (name.equals("double")) {
+            return "marshalDouble";
+        }
+        else if (name.equals("float")) {
+            return "marshalFloat";
+        }
+        else if (name.equals("boolean")) {
+            return "marshalBoolean";
+        }
+        else if( !type.isPrimitiveType() ) {
+            return "marshalObject" ;
+        }
+        else {
+            return name ;
+        }
+    }
+
+    /**
+     * Converts the Java type to the name of the C++ unmarshal method
+     * to be used
+     */
+    public String toUnmarshalMethodName(JClass type) {
+        String name = type.getSimpleName();
+        if (name.equals("String")) {
+            return "unmarshalString";
+        }
+        else if (type.isArrayType()) {
+            if ( type.getArrayComponentType().isPrimitiveType() && name.equals("byte[]") )
+                return "unmarshalByteArray" ;
+            else
+                return "unmarshalObjectArray" ;
+        }
+        else if ( name.equals("ByteSequence") ) {
+            return "unmarshalByteArray";
+        }
+        else if (name.equals("short") ) {
+            return "unmarshalShort";
+        }
+        else if (name.equals("int") ) {
+            return "unmarshalInt";
+        }
+        else if (name.equals("long") ) {
+            return "unmarshalLong";
+        }
+        else if (name.equals("byte")) {
+            return "unmarshalByte";
+        }
+        else if (name.equals("double")) {
+            return "unmarshalDouble";
+        }
+        else if (name.equals("float")) {
+            return "unmarshalFloat";
+        }
+        else if (name.equals("boolean")) {
+            return "unmarshalBoolean";
+        }
+        else if( !type.isPrimitiveType() ) {
+            return "unmarshalObject" ;
+        }
+        else {
+            return name ;
+        }
+    }
+
+    /**
+     * Converts the Java type to a C++ pointer cast
+     */
+    public String toUnmarshalCast(JClass type) {
+        String name = toCppType(type) ;
+
+        if( name.startsWith("p<") )
+            return "p_cast<" + name.substring(2) ;
+        else if( name.startsWith("array<") &&
+                 (type.isArrayType() && !type.getArrayComponentType().isPrimitiveType()) &&
+                 !type.getSimpleName().equals("ByteSequence") )
+            return "array_cast<" + name.substring(6) ;
+        else
+            return "" ;
+    }
+}

Added: incubator/activemq/trunk/openwire-cpp/src/gram/java/org/apache/activemq/openwire/tool/OpenWireCppHeadersScript.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/gram/java/org/apache/activemq/openwire/tool/OpenWireCppHeadersScript.java?rev=406628&view=auto
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/gram/java/org/apache/activemq/openwire/tool/OpenWireCppHeadersScript.java (added)
+++ incubator/activemq/trunk/openwire-cpp/src/gram/java/org/apache/activemq/openwire/tool/OpenWireCppHeadersScript.java Mon May 15 06:38:57 2006
@@ -0,0 +1,30 @@
+/**
+ *
+ * Copyright 2005-2006 The Apache Software Foundation
+ *
+ * Licensed 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.
+ */
+package org.apache.activemq.openwire.tool;
+
+
+/**
+ *
+ * @version $Revision: 379734 $
+ */
+public abstract class OpenWireCppHeadersScript extends OpenWireCppClassesScript {
+
+    protected String getFilePostFix() {
+        return ".hpp";
+    }
+
+}

Added: incubator/activemq/trunk/openwire-cpp/src/gram/script/GenerateCppClasses.groovy
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/gram/script/GenerateCppClasses.groovy?rev=406628&view=auto
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/gram/script/GenerateCppClasses.groovy (added)
+++ incubator/activemq/trunk/openwire-cpp/src/gram/script/GenerateCppClasses.groovy Mon May 15 06:38:57 2006
@@ -0,0 +1,125 @@
+/**
+ *
+ * Copyright 2005-2006 The Apache Software Foundation
+ *
+ * Licensed 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.
+ */
+import org.apache.activemq.openwire.tool.OpenWireCppClassesScript
+
+/**
+ * Generates the C++ commands for the Open Wire Format
+ *
+ * @version $Revision$
+ */
+class GenerateCppClasses extends OpenWireCppClassesScript {
+
+	void generateFile(PrintWriter out) {
+                out << """/*
+* Copyright 2006 The Apache Software Foundation or its licensors, as
+* applicable.
+*
+* Licensed 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/command/${className}.hpp"
+
+using namespace apache::activemq::command;
+
+/*
+ *
+ *  Command and marshalling code for OpenWire format for ${className}
+ *
+ *
+ *  NOTE!: This file is autogenerated - do not modify!
+ *         if you need to make a change, please see the Groovy scripts in the
+ *         activemq-core module
+ *
+ */
+${className}::${className}()
+{"""
+    for (property in properties) {
+        def value = toCppDefaultValue(property.type)
+        def propertyName = property.simpleName
+        def parameterName = decapitalize(propertyName)
+        out << """
+    this->${parameterName} = ${value} ;"""
+    }
+    out << """
+}
+
+${className}::~${className}()
+{
+}
+
+unsigned char ${className}::getDataStructureType()
+{
+    return ${className}::TYPE ; 
+}
+"""
+    for (property in properties) {
+        def type = toCppType(property.type)
+        def propertyName = property.simpleName
+        def parameterName = decapitalize(propertyName)
+        out << """
+        
+${type} ${className}::get${propertyName}()
+{
+    return ${parameterName} ;
+}
+
+void ${className}::set${propertyName}(${type} ${parameterName})
+{
+    this->${parameterName} = ${parameterName} ;
+}
+"""
+    }
+out << """
+int ${className}::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException)
+{
+    int size = 0 ;
+
+    size += ${baseClass}::marshal(marshaller, mode, ostream) ; """
+    for (property in properties) {
+        def marshalMethod = toMarshalMethodName(property.type)
+        def propertyName = decapitalize(property.simpleName)
+        out << """
+    size += marshaller->${marshalMethod}(${propertyName}, mode, ostream) ; """
+    }
+out << """
+    return size ;
+}
+
+void ${className}::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException)
+{
+    ${baseClass}::unmarshal(marshaller, mode, istream) ; """
+    for (property in properties) {
+        def cast = toUnmarshalCast(property.type)
+        def unmarshalMethod = toUnmarshalMethodName(property.type)
+        def propertyName = decapitalize(property.simpleName)
+        out << """
+    ${propertyName} = ${cast}(marshaller->${unmarshalMethod}(mode, istream)) ; """
+    }
+out << """
+}
+"""
+    }
+}

Added: incubator/activemq/trunk/openwire-cpp/src/gram/script/GenerateCppHeaders.groovy
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/gram/script/GenerateCppHeaders.groovy?rev=406628&view=auto
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/gram/script/GenerateCppHeaders.groovy (added)
+++ incubator/activemq/trunk/openwire-cpp/src/gram/script/GenerateCppHeaders.groovy Mon May 15 06:38:57 2006
@@ -0,0 +1,153 @@
+/**
+ *
+ * Copyright 2005-2006 The Apache Software Foundation
+ *
+ * Licensed 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.
+ */
+import org.apache.activemq.openwire.tool.OpenWireCppHeadersScript
+
+/**
+ * Generates the C++ commands for the Open Wire Format
+ *
+ * @version $Revision$
+ */
+class GenerateCppHeaders extends OpenWireCppHeadersScript {
+
+	void generateFile(PrintWriter out) {
+                out << """/*
+* Copyright 2006 The Apache Software Foundation or its licensors, as
+* applicable.
+*
+* Licensed 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_${className}_hpp_
+#define ActiveMQ_${className}_hpp_
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+#include <string>
+"""
+    out << """#include "activemq/command/${baseClass}.hpp"
+"""
+for (property in properties)
+{
+    if( !property.type.isPrimitiveType() &&
+         property.type.simpleName != "String" &&
+         property.type.simpleName != "ByteSequence" )
+    {
+        def includeName = toCppType(property.type)
+        if( property.type.isArrayType() )
+        {
+            def arrayType = property.type.arrayComponentType ;
+            if( arrayType.isPrimitiveType() )
+                continue ;
+        }
+        if( includeName.startsWith("array<") )
+            includeName = includeName.substring(6, includeName.length()-1) ;
+        else if( includeName.startsWith("p<") )
+            includeName = includeName.substring(2, includeName.length()-1)
+
+        if( includeName.equals("IDataStructure") )
+            out << """#include "activemq/${includeName}.hpp"
+"""
+        else
+            out << """#include "activemq/command/${includeName}.hpp"
+"""
+    }
+}
+out << """
+#include "activemq/protocol/IMarshaller.hpp"
+#include "ppr/io/IOutputStream.hpp"
+#include "ppr/io/IInputStream.hpp"
+#include "ppr/io/IOException.hpp"
+#include "ppr/util/ifr/array"
+#include "ppr/util/ifr/p"
+
+namespace apache
+{
+  namespace activemq
+  {
+    namespace command
+    {
+      using namespace ifr;
+      using namespace std;
+      using namespace apache::activemq;
+      using namespace apache::activemq::protocol;
+      using namespace apache::ppr::io;
+
+/*
+ *
+ *  Command and marshalling code for OpenWire format for ${className}
+ *
+ *
+ *  NOTE!: This file is autogenerated - do not modify!
+ *         if you need to make a change, please see the Groovy scripts in the
+ *         activemq-core module
+ *
+ */
+class ${className} : public ${baseClass}
+{
+protected:
+"""
+    for (property in properties) {
+        def type = toCppType(property.type)
+        def name = decapitalize(property.simpleName)
+        out << """    $type $name ;
+"""
+    }
+    out << """
+public:
+    const static unsigned char TYPE = ${getOpenWireOpCode(jclass)};
+
+public:
+    ${className}() ;
+    virtual ~${className}() ;
+
+    virtual unsigned char getDataStructureType() ;
+"""
+    for (property in properties) {
+        def type = toCppType(property.type)
+        def propertyName = property.simpleName
+        def parameterName = decapitalize(propertyName)
+        out << """
+    virtual ${type} get${propertyName}() ;
+    virtual void set${propertyName}(${type} ${parameterName}) ;
+"""
+    }
+    out << """
+    virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException) ;
+    virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException) ;
+} ;
+
+/* namespace */
+    }
+  }
+}
+
+#endif /*ActiveMQ_${className}_hpp_*/
+"""
+    }
+}

Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/Connection.cpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/Connection.cpp?rev=406628&r1=406627&r2=406628&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/Connection.cpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/Connection.cpp Mon May 15 06:38:57 2006
@@ -206,7 +206,7 @@
 /*
  * Performs a synchronous request-response with the broker.
  */
-p<Response> Connection::syncRequest(p<ICommand> command) throw(CmsException) 
+p<Response> Connection::syncRequest(p<BaseCommand> command) throw(CmsException) 
 {
     checkConnected() ;
     
@@ -233,7 +233,7 @@
 /*
  *
  */
-void Connection::oneway(p<ICommand> command) throw(CmsException)
+void Connection::oneway(p<BaseCommand> command) throw(CmsException)
 {
     checkConnected() ;
     transport->oneway(command) ;
@@ -247,6 +247,35 @@
     p<RemoveInfo> command = new RemoveInfo() ;
     command->setObjectId( dataStructure ) ;
     syncRequest(command) ;
+
+    //
+    // Delete session from internal list if a session id was supplied
+    // Note! Dispose of sessions should only be invoked from Session.close()
+    //
+    if( dataStructure->getDataStructureType() == SessionId::TYPE )
+    {
+        list< p<ISession> >::iterator tempIter ;
+        p<SessionId>                  sessionId ;
+
+        // Convert data structure to a session id
+        sessionId = p_cast<SessionId> (dataStructure) ;
+
+        // Iterate through all sessions and check for a match on the session id
+        for( tempIter = sessions.begin() ;
+             tempIter != sessions.end() ;
+             tempIter++ )
+        {
+            p<Session> session = p_cast<Session> (*tempIter) ;
+
+            // Do we have a session id match?
+            if( session->getSessionId()->getValue() == sessionId->getValue() )
+            {
+                // Remove session
+                sessions.remove(session) ;
+                break ;
+            }
+        }
+    }
 }
 
 /*
@@ -332,7 +361,7 @@
 /*
  * Handle incoming commands.
  */
-void Connection::onCommand(p<ITransport> transport, p<ICommand> command)
+void Connection::onCommand(p<ITransport> transport, p<BaseCommand> command)
 {
     if( command->getDataStructureType() == MessageDispatch::TYPE )
     {

Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/Connection.hpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/Connection.hpp?rev=406628&r1=406627&r2=406628&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/Connection.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/Connection.hpp Mon May 15 06:38:57 2006
@@ -102,8 +102,8 @@
     // Operation methods
     virtual p<ISession> createSession() throw(CmsException) ;
     virtual p<ISession> createSession(AcknowledgementMode mode) throw(CmsException) ;
-    virtual p<Response> syncRequest(p<ICommand> command) throw(CmsException) ;
-    virtual void oneway(p<ICommand> command) throw(CmsException) ;
+    virtual p<Response> syncRequest(p<BaseCommand> command) throw(CmsException) ;
+    virtual void oneway(p<BaseCommand> command) throw(CmsException) ;
     virtual void disposeOf(p<IDataStructure> dataStructure) throw(CmsException) ;
     virtual p<string> createTemporaryDestinationName() ;
     virtual p<LocalTransactionId> createLocalTransactionId() ;
@@ -113,7 +113,7 @@
     // Implementation methods
     p<SessionInfo> createSessionInfo(AcknowledgementMode mode) ;
     void checkConnected() throw(CmsException) ;
-    void onCommand(p<ITransport> transport, p<ICommand> command) ;
+    void onCommand(p<ITransport> transport, p<BaseCommand> command) ;
     void onError(p<ITransport> transport, exception& error) ;
 } ;
 

Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/ConnectionFactory.cpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/ConnectionFactory.cpp?rev=406628&r1=406627&r2=406628&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/ConnectionFactory.cpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/ConnectionFactory.cpp Mon May 15 06:38:57 2006
@@ -27,7 +27,7 @@
 ConnectionFactory::ConnectionFactory()
 {
     // Use default URI
-    brokerUri        = new Uri ("tcp://localhost:61616?wireFormat=openwire") ;
+    brokerUri        = new Uri ("tcp://localhost:61616") ;
     username         = NULL ;
     password         = NULL ;
     clientId         = Guid::getGuidString() ;

Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/ICommand.hpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/ICommand.hpp?rev=406628&r1=406627&r2=406628&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/ICommand.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/ICommand.hpp Mon May 15 06:38:57 2006
@@ -17,17 +17,18 @@
 #ifndef ActiveMQ_ICommand_hpp_
 #define ActiveMQ_ICommand_hpp_
 
-#include "activemq/IDataStructure.hpp"
+#include "ppr/util/ifr/p"
 
 namespace apache
 {
   namespace activemq
   {
+    using namespace ifr;
 
 /*
  * An OpenWire command
  */
-struct ICommand : IDataStructure
+struct ICommand : Interface
 {
     virtual int getCommandId() = 0;
     virtual void setCommandId(int value) = 0;

Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/IDataStructure.hpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/IDataStructure.hpp?rev=406628&r1=406627&r2=406628&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/IDataStructure.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/IDataStructure.hpp Mon May 15 06:38:57 2006
@@ -39,7 +39,6 @@
 struct IDataStructure : Interface
 {
     virtual unsigned char getDataStructureType() = 0 ;
-    virtual bool isMarshallAware() = 0 ;
     virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) = 0 ;
     virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) = 0 ;
 } ;

Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/MessageConsumer.cpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/MessageConsumer.cpp?rev=406628&r1=406627&r2=406628&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/MessageConsumer.cpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/MessageConsumer.cpp Mon May 15 06:38:57 2006
@@ -162,10 +162,11 @@
 
         if( message != NULL )
         {
-            listener->onMessage(message) ;
-
             // Auto acknowledge message if selected
             autoAcknowledge(message) ;
+
+            // Let listener process message
+            listener->onMessage(message) ;
         }
         else
             break ;

Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/Session.cpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/Session.cpp?rev=406628&r1=406627&r2=406628&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/Session.cpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/Session.cpp Mon May 15 06:38:57 2006
@@ -421,6 +421,11 @@
         map<long long, p<MessageConsumer> >::iterator consumerIter ;
         map<long long, p<MessageProducer> >::iterator producerIter ;
 
+        // Shutdown dispatch thread
+        dispatchThread->interrupt() ;
+        dispatchThread->join() ;
+        dispatchThread = NULL ;
+
         // Iterate through all consumers and close them down
         for( consumerIter = consumers.begin() ;
              consumerIter != consumers.end() ;
@@ -438,12 +443,13 @@
             producerIter->second->close() ;
             producerIter->second = NULL ;
         }
-        // De-register session from broker
+        // De-register session from broker/connection
         connection->disposeOf( sessionInfo->getSessionId() ) ;
 
         // Clean up
         connection = NULL ;
         closed     = true ;
+
     }
 }
 

Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/Session.hpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/Session.hpp?rev=406628&r1=406627&r2=406628&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/Session.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/Session.hpp Mon May 15 06:38:57 2006
@@ -134,6 +134,7 @@
     void interrupt()
     {
         interrupted = true ;
+        wakeup() ;
     }
 
     void wakeup()
@@ -144,13 +145,19 @@
 protected:
     virtual void run () throw (p<exception>) 
     {
-        while( !interrupted )
+        do
         {
             // Wait for wake-up call
             semaphore.wait() ;
 
+            if( interrupted )
+                break ;
+
             session->dispatchAsyncMessages() ;
-        }
+        } while( !interrupted ) ;
+
+        // Clean up (prevent cyclic dependency)
+        session = NULL ;
     }
 } ;
 

Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQBytesMessage.cpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQBytesMessage.cpp?rev=406628&r1=406627&r2=406628&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQBytesMessage.cpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQBytesMessage.cpp Mon May 15 06:38:57 2006
@@ -24,8 +24,10 @@
  */
 ActiveMQBytesMessage::ActiveMQBytesMessage()
 {
-    this->in       = NULL ;
-    this->out      = new ByteArrayOutputStream() ;
+    this->bis      = NULL ;
+    this->bos      = new ByteArrayOutputStream() ;
+    this->dis      = NULL ;
+    this->dos      = new DataOutputStream( bos ) ;
     this->readMode = false ;
 }
 
@@ -38,8 +40,10 @@
     array<char> buffer = array<char> (size) ;
     memcpy(buffer.c_array(), body, size);
 
-    this->in       = NULL ;
-    this->out      = new ByteArrayOutputStream(buffer) ;
+    this->bis      = NULL ;
+    this->bos      = new ByteArrayOutputStream(buffer) ;
+    this->dis      = NULL ;
+    this->dos      = new DataOutputStream( bos ) ;
     this->readMode = false ;
 }
 
@@ -63,10 +67,20 @@
  */
 void ActiveMQBytesMessage::reset()
 {
-    if( !readMode )
+    if( readMode )
     {
-        this->in       = new ByteArrayInputStream( out->toArray() ) ;
-        this->out      = NULL ;
+        this->bos      = new ByteArrayOutputStream( bis->toArray() ) ;
+        this->bis      = NULL ;
+        this->dos      = new DataOutputStream( bos ) ;
+        this->dis      = NULL ;
+        this->readMode = false ;
+    }
+    else
+    {
+        this->bis      = new ByteArrayInputStream( bos->toArray() ) ;
+        this->bos      = NULL ;
+        this->dis      = new DataInputStream( bis ) ;
+        this->dos      = NULL ;
         this->readMode = true ;
     }
 }
@@ -83,7 +97,7 @@
     try
     {
         // Read a single byte
-        return readByte() ;
+        return dis->readByte() ;
     }
     catch( EOFException eof )
     {
@@ -94,7 +108,7 @@
 /*
  *
  */
-int ActiveMQBytesMessage::readBytes(char* buffer, int index, int length) throw (MessageNotReadableException, MessageEOFException)
+int ActiveMQBytesMessage::readBytes(char* buffer, int offset, int length) throw (MessageNotReadableException, MessageEOFException)
 {
     // Assert read mode
     if( !readMode )
@@ -103,7 +117,7 @@
     try
     {
         // Read some bytes
-        return in->read(buffer, index, length) ;
+        return dis->read(buffer, offset, length) ;
     }
     catch( EOFException eof )
     {
@@ -123,7 +137,7 @@
     try
     {
         // Read a boolean
-        return in->readBoolean() ;
+        return dis->readBoolean() ;
     }
     catch( EOFException eof )
     {
@@ -143,7 +157,7 @@
     try
     {
         // Read a double
-        return in->readDouble() ;
+        return dis->readDouble() ;
     }
     catch( EOFException eof )
     {
@@ -163,7 +177,7 @@
     try
     {
         // Read a float
-        return in->readFloat() ;
+        return dis->readFloat() ;
     }
     catch( EOFException eof )
     {
@@ -183,7 +197,7 @@
     try
     {
         // Read a short
-        return in->readShort() ;
+        return dis->readShort() ;
     }
     catch( EOFException eof )
     {
@@ -203,7 +217,7 @@
     try
     {
         // Read an integer
-        return in->readInt() ;
+        return dis->readInt() ;
     }
     catch( EOFException eof )
     {
@@ -223,7 +237,7 @@
     try
     {
         // Read a long long
-        return in->readLong() ;
+        return dis->readLong() ;
     }
     catch( EOFException eof )
     {
@@ -234,7 +248,7 @@
 /*
  *
  */
-p<string> ActiveMQBytesMessage::readUTF() throw(MessageNotReadableException, MessageEOFException)
+p<string> ActiveMQBytesMessage::readString() throw(MessageNotReadableException, MessageEOFException)
 {
     // Assert read mode
     if( !readMode )
@@ -243,7 +257,7 @@
     try
     {
         // Read a string
-        return in->readString() ;
+        return dis->readString() ;
     }
     catch( EOFException eof )
     {
@@ -261,20 +275,20 @@
         throw MessageNotWritableException() ;
 
     // Write a single byte
-    out->writeByte(value) ;
+    dos->writeByte(value) ;
 }
 
 /*
  * 
  */
-void ActiveMQBytesMessage::writeBytes(char* value, int index, int length) throw (MessageNotWritableException)
+void ActiveMQBytesMessage::writeBytes(char* value, int offset, int length) throw (MessageNotWritableException)
 {
     // Assert write mode
     if( readMode )
         throw MessageNotWritableException() ;
 
     // Write some bytes
-    out->write(value, index, length) ;
+    dos->write(value, offset, length) ;
 }
 
 /*
@@ -287,7 +301,7 @@
         throw MessageNotWritableException() ;
 
     // Write a boolean
-    out->writeBoolean(value) ;
+    dos->writeBoolean(value) ;
 }
 
 /*
@@ -300,7 +314,7 @@
         throw MessageNotWritableException() ;
 
     // Write a double
-    out->writeDouble(value) ;
+    dos->writeDouble(value) ;
 }
 
 /*
@@ -313,7 +327,7 @@
         throw MessageNotWritableException() ;
 
     // Write a float
-    out->writeFloat(value) ;
+    dos->writeFloat(value) ;
 }
 
 /*
@@ -326,7 +340,7 @@
         throw MessageNotWritableException() ;
 
     // Write an integer
-    out->writeInt(value) ;
+    dos->writeInt(value) ;
 }
 
 /*
@@ -339,7 +353,7 @@
         throw MessageNotWritableException() ;
 
     // Write a long long
-    out->writeLong(value) ;
+    dos->writeLong(value) ;
 }
 
 /*
@@ -352,13 +366,13 @@
         throw MessageNotWritableException() ;
 
     // Write a short
-    out->writeShort(value) ;
+    dos->writeShort(value) ;
 }
 
 /*
  * 
  */
-void ActiveMQBytesMessage::writeUTF(const char* value) throw (MessageNotWritableException)
+void ActiveMQBytesMessage::writeString(const char* value) throw (MessageNotWritableException)
 {
     // Assert write mode
     if( readMode )
@@ -366,22 +380,22 @@
 
     // Write a string
     p<string> v = new string(value) ;
-    out->writeString(v) ;
+    dos->writeString(v) ;
 }
 
 /*
  *
  */
-int ActiveMQBytesMessage::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException)
+int ActiveMQBytesMessage::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException)
 {
     int size = 0 ;
 
     // Copy body to message content container
     if( mode == IMarshaller::MARSHAL_SIZE )
-        this->content = ( readMode) ? in->toArray() : out->toArray() ;
+        this->content = ( readMode) ? bis->toArray() : bos->toArray() ;
 
 //    size += (int)this->content.size() ;
-    size += ActiveMQMessage::marshal(marshaller, mode, writer) ;
+    size += ActiveMQMessage::marshal(marshaller, mode, ostream) ;
 
     // Note! Message content marshalling is done in super class
 
@@ -391,16 +405,18 @@
 /*
  *
  */
-void ActiveMQBytesMessage::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException)
+void ActiveMQBytesMessage::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException)
 {
     // Note! Message content unmarshalling is done in super class
-    ActiveMQMessage::unmarshal(marshaller, mode, reader) ;
+    ActiveMQMessage::unmarshal(marshaller, mode, istream) ;
 
     // Copy body to message content holder
     if( mode == IMarshaller::MARSHAL_READ )
     {
-        in       = new ByteArrayInputStream( this->content ) ;
-        out      = NULL ;
+        bis      = new ByteArrayInputStream( this->content ) ;
+        bos      = NULL ;
+        dis      = new DataInputStream( bis ) ;
+        dos      = NULL ;
         readMode = true ;
     }
 }

Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQBytesMessage.hpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQBytesMessage.hpp?rev=406628&r1=406627&r2=406628&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQBytesMessage.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQBytesMessage.hpp Mon May 15 06:38:57 2006
@@ -30,6 +30,8 @@
 #include "activemq/command/ActiveMQMessage.hpp"
 #include "ppr/io/ByteArrayInputStream.hpp"
 #include "ppr/io/ByteArrayOutputStream.hpp"
+#include "ppr/io/DataInputStream.hpp"
+#include "ppr/io/DataOutputStream.hpp"
 #include "ppr/io/EOFException.hpp"
 #include "ppr/util/Endian.hpp"
 #include "ppr/util/MapItemHolder.hpp"
@@ -53,9 +55,11 @@
 class ActiveMQBytesMessage : public ActiveMQMessage , public IBytesMessage
 {
 private:
-    p<ByteArrayInputStream>  in ;
-    p<ByteArrayOutputStream> out ;
-    bool  readMode ;
+    p<DataInputStream>       dis ;
+    p<DataOutputStream>      dos ;
+    p<ByteArrayInputStream>  bis ;
+    p<ByteArrayOutputStream> bos ;
+    bool                     readMode ;
 
     const static int INITIAL_SIZE = 256 ;
     const static int EXPAND_SIZE  = 128 ;
@@ -72,23 +76,23 @@
 
     virtual void reset() ;
     virtual char readByte() throw (MessageNotReadableException, MessageEOFException) ;
-    virtual int readBytes(char* buffer, int index, int length) throw (MessageNotReadableException, MessageEOFException) ;
+    virtual int readBytes(char* buffer, int offset, int length) throw (MessageNotReadableException, MessageEOFException) ;
     virtual bool readBoolean() throw (MessageNotReadableException, MessageEOFException) ;
     virtual double readDouble() throw (MessageNotReadableException, MessageEOFException) ;
     virtual float readFloat() throw (MessageNotReadableException, MessageEOFException) ;
     virtual int readInt() throw (MessageNotReadableException, MessageEOFException) ;
     virtual long long readLong() throw (MessageNotReadableException, MessageEOFException) ;
     virtual short readShort() throw (MessageNotReadableException, MessageEOFException) ;
-    virtual p<string> readUTF() throw (MessageNotReadableException, MessageEOFException) ;
+    virtual p<string> readString() throw (MessageNotReadableException, MessageEOFException) ;
     virtual void writeBoolean(bool value) throw (MessageNotWritableException) ;
     virtual void writeByte(char value) throw (MessageNotWritableException) ;
-    virtual void writeBytes(char* value, int index, int length) throw (MessageNotWritableException) ;
+    virtual void writeBytes(char* value, int offset, int length) throw (MessageNotWritableException) ;
     virtual void writeDouble(double value) throw (MessageNotWritableException) ;
     virtual void writeFloat(float value) throw (MessageNotWritableException) ;
     virtual void writeInt(int value) throw (MessageNotWritableException) ;
     virtual void writeLong(long long value) throw (MessageNotWritableException) ;
     virtual void writeShort(short value) throw (MessageNotWritableException) ;
-    virtual void writeUTF(const char* value) throw (MessageNotWritableException) ;
+    virtual void writeString(const char* value) throw (MessageNotWritableException) ;
 
     virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException) ;
     virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException) ;

Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQDestination.cpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQDestination.cpp?rev=406628&r1=406627&r2=406628&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQDestination.cpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQDestination.cpp Mon May 15 06:38:57 2006
@@ -347,18 +347,18 @@
 /*
  *
  */
-int ActiveMQDestination::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException)
+int ActiveMQDestination::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException)
 {
     int size = 0 ;
 
-    size += marshaller->marshalString(physicalName, mode, writer) ; 
+    size += marshaller->marshalString(physicalName, mode, ostream) ; 
     return size ;
 }
 
 /*
  *
  */
-void ActiveMQDestination::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException)
+void ActiveMQDestination::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException)
 {
-    physicalName = p_cast<string>(marshaller->unmarshalString(mode, reader)) ; 
+    physicalName = p_cast<string>(marshaller->unmarshalString(mode, istream)) ; 
 }

Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQDestination.hpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQDestination.hpp?rev=406628&r1=406627&r2=406628&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQDestination.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQDestination.hpp Mon May 15 06:38:57 2006
@@ -23,7 +23,7 @@
 #include "cms/IQueue.hpp"
 #include "cms/ITemporaryTopic.hpp"
 #include "cms/ITemporaryQueue.hpp"
-#include "activemq/command/AbstractCommand.hpp"
+#include "activemq/command/BaseCommand.hpp"
 #include "activemq/protocol/IMarshaller.hpp"
 #include "ppr/io/IOutputStream.hpp"
 #include "ppr/io/IInputStream.hpp"
@@ -49,7 +49,7 @@
 /*
  * 
  */
-class ActiveMQDestination : public AbstractCommand, public IDestination
+class ActiveMQDestination : public BaseCommand, public IDestination
 {
 private:
     p<string> orderedTarget,
@@ -109,8 +109,8 @@
     virtual bool isWildcard() ;
     virtual p<string> toString() ;
 
-    virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException) ;
-    virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException) ;
+    virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException) ;
+    virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException) ;
 
     //
     // Abstract methods

Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQMapMessage.cpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQMapMessage.cpp?rev=406628&r1=406627&r2=406628&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQMapMessage.cpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQMapMessage.cpp Mon May 15 06:38:57 2006
@@ -15,8 +15,11 @@
  * limitations under the License.
  */
 #include "activemq/command/ActiveMQMapMessage.hpp"
+
 #include "ppr/io/ByteArrayOutputStream.hpp"
 #include "ppr/io/ByteArrayInputStream.hpp"
+#include "ppr/io/DataOutputStream.hpp"
+#include "ppr/io/DataInputStream.hpp"
 
 using namespace apache::activemq::command;
 
@@ -411,7 +414,7 @@
 /*
  * 
  */
-void ActiveMQMapMessage::setString(const char* name, p<string> value) throw (IllegalArgumentException)
+void ActiveMQMapMessage::setString(const char* name, const char* value) throw (IllegalArgumentException)
 {
     // Assert arguments
     if( name == NULL || strcmp(name, "") == 0 )
@@ -455,23 +458,24 @@
 /*
  *
  */
-int ActiveMQMapMessage::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException)
+int ActiveMQMapMessage::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException)
 {
     int size = 0 ;
 
-    // Update message content
+    // Update message content during size lookup
     if( mode == IMarshaller::MARSHAL_SIZE )
     {
-        p<ByteArrayOutputStream> arrayWriter = new ByteArrayOutputStream() ;
+        p<ByteArrayOutputStream> bos = new ByteArrayOutputStream() ;
+        p<DataOutputStream>      dos = new DataOutputStream( bos ) ;
 
         // Marshal map into a byte array
-        marshaller->marshalMap(contentMap, mode, arrayWriter) ;
+        marshaller->marshalMap(contentMap, IMarshaller::MARSHAL_WRITE, dos) ;
 
         // Store map byte array in message content
-        this->content = arrayWriter->toArray() ;
+        this->content = bos->toArray() ;
     }
     // Note! Message content marshalling is done in super class
-    size += ActiveMQMessage::marshal(marshaller, mode, writer) ;
+    size += ActiveMQMessage::marshal(marshaller, mode, ostream) ;
 
     return size ;
 }
@@ -479,17 +483,18 @@
 /*
  *
  */
-void ActiveMQMapMessage::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException)
+void ActiveMQMapMessage::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException)
 {
     // Note! Message content unmarshalling is done in super class
-    ActiveMQMessage::unmarshal(marshaller, mode, reader) ;
+    ActiveMQMessage::unmarshal(marshaller, mode, istream) ;
 
     // Extract map from message content
     if( mode == IMarshaller::MARSHAL_READ )
     {
-        p<ByteArrayInputStream> arrayReader = new ByteArrayInputStream( this->content ) ;
+        p<ByteArrayInputStream> bis = new ByteArrayInputStream( this->content ) ;
+        p<DataInputStream>      dis = new DataInputStream( bis ) ;
 
         // Unmarshal map into a map
-        contentMap = marshaller->unmarshalMap(mode, arrayReader) ;
+        contentMap = marshaller->unmarshalMap(mode, dis) ;
     }
 }

Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQMapMessage.hpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQMapMessage.hpp?rev=406628&r1=406627&r2=406628&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQMapMessage.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQMapMessage.hpp Mon May 15 06:38:57 2006
@@ -83,12 +83,12 @@
     virtual short getShort(const char* name) throw (MessageFormatException, IllegalArgumentException) ;
     virtual void setShort(const char* name, short value) throw (IllegalArgumentException) ;
     virtual p<string> getString(const char* name) throw (MessageFormatException, IllegalArgumentException) ;
-    virtual void setString(const char* name, p<string> value) throw (IllegalArgumentException) ;
+    virtual void setString(const char* name, const char* value) throw (IllegalArgumentException) ;
     virtual array<string> getMapNames() ;
     virtual bool itemExists(const char* name) ;
 
-    virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException) ;
-    virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException) ;
+    virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException) ;
+    virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException) ;
 
     //
     // The methods below are needed to resolve the multiple

Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQMessage.cpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQMessage.cpp?rev=406628&r1=406627&r2=406628&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQMessage.cpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQMessage.cpp Mon May 15 06:38:57 2006
@@ -15,8 +15,11 @@
  * limitations under the License.
  */
 #include "activemq/command/ActiveMQMessage.hpp"
+
 #include "ppr/io/ByteArrayOutputStream.hpp"
 #include "ppr/io/ByteArrayInputStream.hpp"
+#include "ppr/io/DataOutputStream.hpp"
+#include "ppr/io/DataInputStream.hpp"
 
 using namespace apache::activemq::command;
 
@@ -320,23 +323,24 @@
 /*
  * 
  */
-int ActiveMQMessage::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw(IOException)
+int ActiveMQMessage::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw(IOException)
 {
     int size = 0 ;
 
     // Update message content if available
     if( mode == IMarshaller::MARSHAL_SIZE && this->properties != NULL )
     {
-        p<ByteArrayOutputStream> arrayWriter = new ByteArrayOutputStream() ;
+        p<ByteArrayOutputStream> bos = new ByteArrayOutputStream() ;
+        p<DataOutputStream>      dos = new DataOutputStream( bos ) ;
 
         // Marshal properties into a byte array
-        marshaller->marshalMap(properties, IMarshaller::MARSHAL_WRITE, arrayWriter) ;
+        marshaller->marshalMap(properties, IMarshaller::MARSHAL_WRITE, dos) ;
 
         // Store properties byte array in message content
-        this->marshalledProperties = arrayWriter->toArray() ;
+        this->marshalledProperties = bos->toArray() ;
     }
     // Note! Message propertys marshalling is done in super class
-    size += Message::marshal(marshaller, mode, writer) ;
+    size += Message::marshal(marshaller, mode, ostream) ;
 
     return size ;
 }
@@ -344,31 +348,21 @@
 /*
  * 
  */
-void ActiveMQMessage::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw(IOException)
+void ActiveMQMessage::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw(IOException)
 {
     // Note! Message property unmarshalling is done in super class
-    Message::unmarshal(marshaller, mode, reader) ;
+    Message::unmarshal(marshaller, mode, istream) ;
 
     // Extract properties from message
     if( mode == IMarshaller::MARSHAL_READ )
     {
         if( this->marshalledProperties != NULL )
         {
-            p<ByteArrayInputStream> arrayReader = new ByteArrayInputStream( this->marshalledProperties ) ;
+            p<ByteArrayInputStream> bis = new ByteArrayInputStream( this->marshalledProperties ) ;
+            p<DataInputStream>      dis = new DataInputStream( bis ) ;
 
             // Unmarshal map into a map
-            properties = marshaller->unmarshalMap(mode, arrayReader) ;
+            properties = marshaller->unmarshalMap(mode, dis) ;
         }
     }
 }
-
-
-// Static methods ---------------------------------------------------
-
-/*
- * 
- */
-/*p<ActiveMQMessage> ActiveMQMessage::transform(p<IMessage> message)
-{
-    return p_cast<ActiveMQMessage> (message) ;
-}*/

Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQMessage.hpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQMessage.hpp?rev=406628&r1=406627&r2=406628&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQMessage.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQMessage.hpp Mon May 15 06:38:57 2006
@@ -88,12 +88,8 @@
 
 protected:
     // Implementation
-    int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw(IOException) ;
-    void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw(IOException) ;
-
-public:
-    // Static methods
-    //static p<ActiveMQMessage> transform(p<IMessage> message) ;
+    int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw(IOException) ;
+    void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw(IOException) ;
 } ;
 
 /* namespace */