Return-Path: Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: (qmail 80165 invoked from network); 13 Oct 2007 13:19:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Oct 2007 13:19:03 -0000 Received: (qmail 44543 invoked by uid 500); 13 Oct 2007 13:18:51 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 44522 invoked by uid 500); 13 Oct 2007 13:18:51 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 44513 invoked by uid 99); 13 Oct 2007 13:18:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 13 Oct 2007 06:18:51 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 13 Oct 2007 13:19:02 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 4D5291A9832; Sat, 13 Oct 2007 06:18:12 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r584398 - in /activemq/activemq-cpp/trunk/src/main/activemq: connector/ connector/openwire/ connector/stomp/ core/ Date: Sat, 13 Oct 2007 13:18:11 -0000 To: commits@activemq.apache.org From: nmittler@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20071013131812.4D5291A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: nmittler Date: Sat Oct 13 06:18:09 2007 New Revision: 584398 URL: http://svn.apache.org/viewvc?rev=584398&view=rev Log: [AMQCPP-145] - Updated enumeration names in connectors to avoid name conflict in Windows Vista Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/Connector.h activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireConnector.cpp activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireConnector.h activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompConnector.cpp activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompConnector.h activemq/activemq-cpp/trunk/src/main/activemq/core/ActiveMQTransaction.cpp Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/Connector.h URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/Connector.h?rev=584398&r1=584397&r2=584398&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/src/main/activemq/connector/Connector.h (original) +++ activemq/activemq-cpp/trunk/src/main/activemq/connector/Connector.h Sat Oct 13 06:18:09 2007 @@ -55,22 +55,22 @@ protected: // Flags the state we are in for connection to broker. - enum connectionState + enum ConnectionState { - DISCONNECTED, - CONNECTION_ERROR, - CONNECTING, - CONNECTED + CONNECTION_STATE_DISCONNECTED, + CONNECTION_STATE_ERROR, + CONNECTION_STATE_CONNECTING, + CONNECTION_STATE_CONNECTED }; public: // Connector Types enum AckType { - DeliveredAck = 0, // Message delivered but not consumed - PoisonAck = 1, // Message could not be processed due to - // poison pill but discard anyway - ConsumedAck = 2 // Message consumed, discard + ACK_TYPE_DELIVERED = 0, // Message delivered but not consumed + ACK_TYPE_POISON = 1, // Message could not be processed due to + // poison pill but discard anyway + ACK_TYPE_CONSUMED = 2 // Message consumed, discard }; public: @@ -250,7 +250,7 @@ virtual void acknowledge( const SessionInfo* session, const ConsumerInfo* consumer, const cms::Message* message, - AckType ackType = ConsumedAck) + AckType ackType = ACK_TYPE_CONSUMED) throw ( ConnectorException ) = 0; /** Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireConnector.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireConnector.cpp?rev=584398&r1=584397&r2=584398&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireConnector.cpp (original) +++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireConnector.cpp Sat Oct 13 06:18:09 2007 @@ -79,7 +79,7 @@ // Create our WireFormatFactory on the stack, only need it once. OpenWireFormatFactory wireFormatFactory; - this->state = DISCONNECTED; + this->state = CONNECTION_STATE_DISCONNECTED; this->exceptionListener = NULL; this->messageListener = NULL; this->brokerInfo = NULL; @@ -193,7 +193,7 @@ //////////////////////////////////////////////////////////////////////////////// void OpenWireConnector::enforceConnected() throw ( ConnectorException ) { - if( state != CONNECTED ) + if( state != CONNECTION_STATE_CONNECTED ) { throw OpenWireConnectorException( __FILE__, __LINE__, @@ -208,7 +208,7 @@ { synchronized( &mutex ) { - if( state == CONNECTED ) + if( state == CONNECTION_STATE_CONNECTED ) { throw ActiveMQException( __FILE__, __LINE__, @@ -233,7 +233,7 @@ { synchronized( &mutex ) { - if( state == CONNECTED ) + if( state == CONNECTION_STATE_CONNECTED ) { // Send the disconnect message to the broker. disconnect(); @@ -253,7 +253,7 @@ try { // Mark this connector as started. - state = CONNECTING; + state = CONNECTION_STATE_CONNECTING; // Fill in our connection info. connectionInfo.setUserName( getUsername() ); @@ -276,7 +276,7 @@ Response* response = syncRequest( &connectionInfo ); // Tag us in the Connected State now. - state = CONNECTED; + state = CONNECTION_STATE_CONNECTED; // Clean up the ack delete response; @@ -291,7 +291,7 @@ try { // Mark state as no longer connected. - state = DISCONNECTED; + state = CONNECTION_STATE_DISCONNECTED; // Remove our ConnectionId from the Broker disposeOf( connectionInfo.getConnectionId() ); @@ -1063,7 +1063,7 @@ dynamic_cast( connectionInfo.getConnectionId()->cloneDataStructure() ) ); info->setTransactionId( createLocalTransactionId() ); - info->setType( (int)TRANSACTION_BEGIN ); + info->setType( (int)TRANSACTION_STATE_BEGIN ); oneway( info ); @@ -1105,7 +1105,7 @@ commands::TransactionInfo* info = transactionInfo->getTransactionInfo(); - info->setType( (int)TRANSACTION_COMMITONEPHASE ); + info->setType( (int)TRANSACTION_STATE_COMMITONEPHASE ); oneway( info ); } catch( ConnectorException& ex ){ @@ -1142,7 +1142,7 @@ commands::TransactionInfo* info = transactionInfo->getTransactionInfo(); - info->setType( (int)TRANSACTION_ROLLBACK ); + info->setType( (int)TRANSACTION_STATE_ROLLBACK ); oneway( info ); } catch( ConnectorException& ex ){ @@ -1253,7 +1253,7 @@ // if we don't get a resource or we aren't connected then we can't do // anything so we return quickly. - if( resource == NULL || state != CONNECTED ) { + if( resource == NULL || state != CONNECTION_STATE_CONNECTED ) { return; } @@ -1373,7 +1373,7 @@ } else if( typeid( *command ) == typeid( commands::ShutdownInfo ) ) { try { - if( state != DISCONNECTED ) { + if( state != CONNECTION_STATE_DISCONNECTED ) { fire( CommandIOException( __FILE__, __LINE__, @@ -1402,15 +1402,12 @@ try { // We're disconnected - the asynchronous error is expected. - if( state == DISCONNECTED ){ + if( state == CONNECTION_STATE_DISCONNECTED ){ return; } - // We were not closing - log the stack trace. - //LOGCMS_WARN( logger, ex.getStackTraceString() ); - // Mark the fact that we are in an error state - state = CONNECTION_ERROR; + state = CONNECTION_STATE_ERROR; // Inform the user of the error. fire( ex ); Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireConnector.h URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireConnector.h?rev=584398&r1=584397&r2=584398&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireConnector.h (original) +++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireConnector.h Sat Oct 13 06:18:09 2007 @@ -74,16 +74,15 @@ private: // Enumeration of Transaction State flags - enum TransactionType - { - TRANSACTION_BEGIN = 0, - TRANSACTION_PREPARE = 1, - TRANSACTION_COMMITONEPHASE = 2, - TRANSACTION_COMMITTWOPHASE = 3, - TRANSACTION_ROLLBACK = 4, - TRANSACTION_RECOVER = 5, - TRANSACTION_FORGET = 6, - TRANSACTION_END = 7 + enum TransactionState { + TRANSACTION_STATE_BEGIN = 0, + TRANSACTION_STATE_PREPARE = 1, + TRANSACTION_STATE_COMMITONEPHASE = 2, + TRANSACTION_STATE_COMMITTWOPHASE = 3, + TRANSACTION_STATE_ROLLBACK = 4, + TRANSACTION_STATE_RECOVER = 5, + TRANSACTION_STATE_FORGET = 6, + TRANSACTION_STATE_END = 7 }; private: @@ -117,7 +116,7 @@ /** * Flag to indicate the start state of the connector. */ - connectionState state; + ConnectionState state; /** * Sync object. Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompConnector.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompConnector.cpp?rev=584398&r1=584397&r2=584398&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompConnector.cpp (original) +++ activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompConnector.cpp Sat Oct 13 06:18:09 2007 @@ -60,7 +60,7 @@ "StompConnector::StompConnector - Transport cannot be NULL"); } - this->state = DISCONNECTED; + this->state = CONNECTION_STATE_DISCONNECTED; this->exceptionListener = NULL; this->messageListener = NULL; this->sessionManager = NULL; @@ -122,7 +122,7 @@ //////////////////////////////////////////////////////////////////////////////// void StompConnector::enforceConnected() throw ( ConnectorException ) { - if( state != CONNECTED ) + if( state != CONNECTION_STATE_CONNECTED ) { throw StompConnectorException( __FILE__, __LINE__, @@ -152,7 +152,7 @@ { synchronized( &mutex ) { - if( state == CONNECTED ) + if( state == CONNECTION_STATE_CONNECTED ) { throw ActiveMQException( __FILE__, __LINE__, @@ -175,7 +175,7 @@ try { - if( state == DISCONNECTED ){ + if( state == CONNECTION_STATE_DISCONNECTED ){ return; } @@ -197,7 +197,7 @@ try { // Mark this connector as started. - state = CONNECTING; + state = CONNECTION_STATE_CONNECTING; // Send the connect command to the broker ConnectCommand cmd; @@ -252,7 +252,7 @@ connected->getSessionId() ); // Tag us in the Connected State now. - state = CONNECTED; + state = CONNECTION_STATE_CONNECTED; // Clean up delete response; @@ -267,7 +267,7 @@ try { // Mark state as no longer connected. - state = DISCONNECTED; + state = CONNECTION_STATE_DISCONNECTED; // Send the disconnect command to the broker. DisconnectCommand cmd; @@ -828,7 +828,7 @@ try { // We're disconnected - the asynchronous error is expected. - if( state == DISCONNECTED ){ + if( state == CONNECTION_STATE_DISCONNECTED ){ return; } Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompConnector.h URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompConnector.h?rev=584398&r1=584397&r2=584398&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompConnector.h (original) +++ activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompConnector.h Sat Oct 13 06:18:09 2007 @@ -66,7 +66,7 @@ /** * Flag to indicate the start state of the connector. */ - connectionState state; + ConnectionState state; /** * Sync object. @@ -363,7 +363,7 @@ virtual void acknowledge( const SessionInfo* session, const ConsumerInfo* consumer, const cms::Message* message, - AckType ackType = ConsumedAck) + AckType ackType = ACK_TYPE_CONSUMED) throw ( ConnectorException ); /** Modified: activemq/activemq-cpp/trunk/src/main/activemq/core/ActiveMQTransaction.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/core/ActiveMQTransaction.cpp?rev=584398&r1=584397&r2=584398&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/src/main/activemq/core/ActiveMQTransaction.cpp (original) +++ activemq/activemq-cpp/trunk/src/main/activemq/core/ActiveMQTransaction.cpp Sat Oct 13 06:18:09 2007 @@ -293,7 +293,7 @@ session->getSessionInfo(), consumer->getConsumerInfo(), dynamic_cast< Message* >( message ), - Connector::PoisonAck ); + Connector::ACK_TYPE_POISON ); // Won't redeliver this so we kill it here. delete message;