activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r508443 - in /activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq: connector/ connector/openwire/ connector/stomp/ core/
Date Fri, 16 Feb 2007 15:18:59 GMT
Author: tabish
Date: Fri Feb 16 07:18:58 2007
New Revision: 508443

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

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/ConsumerInfo.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/ProducerInfo.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/SessionInfo.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/TransactionInfo.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConnector.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConsumerInfo.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireProducerInfo.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireSessionInfo.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireTransactionInfo.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompConnector.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompConnector.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompConsumerInfo.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompProducerInfo.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompSessionInfo.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompTransactionInfo.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQTransaction.h

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/ConsumerInfo.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/ConsumerInfo.h?view=diff&rev=508443&r1=508442&r2=508443
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/ConsumerInfo.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/ConsumerInfo.h Fri
Feb 16 07:18:58 2007
@@ -47,13 +47,13 @@
          * Gets the ID that is assigned to this consumer
          * @return value of the Consumer Id.
          */
-        virtual unsigned int getConsumerId(void) const = 0;
+        virtual long long getConsumerId(void) const = 0;
 
         /**
          * Sets the ID that is assigned to this consumer
          * @return id string value of the Consumer Id.
          */
-        virtual void setConsumerId( const unsigned int id ) = 0;
+        virtual void setConsumerId( long long id ) = 0;
 
         /**
          * Gets the Destination that this Consumer is subscribed on

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/ProducerInfo.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/ProducerInfo.h?view=diff&rev=508443&r1=508442&r2=508443
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/ProducerInfo.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/ProducerInfo.h Fri
Feb 16 07:18:58 2007
@@ -48,13 +48,13 @@
          * Gets the ID that is assigned to this Producer
          * @return value of the Producer Id.
          */
-        virtual unsigned int getProducerId(void) const = 0;
+        virtual long long getProducerId(void) const = 0;
 
         /**
          * Sets the ID that is assigned to this Producer
          * @return id string value of the Producer Id.
          */
-        virtual void setProducerId( const unsigned int id ) = 0;
+        virtual void setProducerId( long long id ) = 0;
 
         /**
          * Gets the Session Info that this consumer is attached too

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/SessionInfo.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/SessionInfo.h?view=diff&rev=508443&r1=508442&r2=508443
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/SessionInfo.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/SessionInfo.h Fri
Feb 16 07:18:58 2007
@@ -29,45 +29,45 @@
     public:
 
    	    virtual ~SessionInfo(void) {}
-        
+
         /**
          * Gets the Connection Id of the Connection that this consumer is
          * using to receive its messages.
          * @return string value of the connection id
          */
         virtual const std::string& getConnectionId(void) const = 0;
-   
+
         /**
          * Sets the Connection Id of the Connection that this consumer is
          * using to receive its messages.
          * @param id string value of the connection id
          */
         virtual void setConnectionId( const std::string& id ) = 0;
-        
+
         /**
          * Gets the Sessions Id value
          * @return id for this session
          */
-        virtual unsigned int getSessionId(void) const = 0;
+        virtual long long getSessionId(void) const = 0;
 
         /**
          * Sets the Session Id for this Session
          * @param id integral id value for this session
          */
-        virtual void setSessionId( const unsigned int id ) = 0;
+        virtual void setSessionId( long long id ) = 0;
 
         /**
          * Sets the Ack Mode of this Session Info object
          * @param ackMode Ack Mode
          */
         virtual void setAckMode(cms::Session::AcknowledgeMode ackMode) = 0;
-        
+
         /**
          * Gets the Ack Mode of this Session
          * @return Ack Mode
          */
         virtual cms::Session::AcknowledgeMode getAckMode(void) const = 0;
-        
+
         /**
          * Gets the currently active transaction info, if this session is
          * transacted, returns NULL when not transacted.  You must call
@@ -75,14 +75,14 @@
          * @return Transaction Id of current Transaction
          */
         virtual const TransactionInfo* getTransactionInfo(void) const = 0;
-        
+
         /**
          * Sets the current transaction info for this session, this is nit
          * used when the session is not transacted.
          * @param transaction Transaction Id
-         */        
+         */
         virtual void setTransactionInfo( const TransactionInfo* transaction ) = 0;
-        
+
     };
 
 }}

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/TransactionInfo.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/TransactionInfo.h?view=diff&rev=508443&r1=508442&r2=508443
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/TransactionInfo.h
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/TransactionInfo.h
Fri Feb 16 07:18:58 2007
@@ -27,20 +27,20 @@
     class TransactionInfo : public ConnectorResource
     {
     public:
-   
+
    	    virtual ~TransactionInfo(void) {}
-        
+
         /**
          * Gets the Transction Id
          * @return unsigned int Id
          */
-        virtual unsigned int getTransactionId(void) const = 0;
+        virtual long long getTransactionId(void) const = 0;
 
         /**
          * Sets the Transction Id
          * @param id unsigned int Id
          */
-        virtual void setTransactionId( const unsigned int id ) = 0;
+        virtual void setTransactionId( long long id ) = 0;
 
         /**
          * Gets the Session Info that this transaction is attached too

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConnector.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConnector.cpp?view=diff&rev=508443&r1=508442&r2=508443
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConnector.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConnector.cpp
Fri Feb 16 07:18:58 2007
@@ -100,25 +100,10 @@
     {
         close();
 
-        if( transport != NULL ) {
-            delete transport;
-            transport = NULL;
-        }
-        
-        if( wireFormat != NULL ) {
-            delete wireFormat;
-            wireFormat = NULL; 
-        }
-        
-        if( brokerInfo != NULL ) {            
-            delete brokerInfo;
-            brokerInfo = NULL;
-        }
-        
-        if( brokerWireFormatInfo != NULL ) {
-            delete brokerWireFormatInfo;
-            brokerWireFormatInfo = NULL;
-        }
+        delete transport;
+        delete wireFormat;
+        delete brokerInfo;
+        delete brokerWireFormatInfo;
     }
     AMQ_CATCH_NOTHROW( ActiveMQException )
     AMQ_CATCHALL_NOTHROW( )
@@ -287,10 +272,10 @@
         try{
             transport->close();
         } catch( cms::CMSException& e ){}
-        
+
         throw OpenWireConnectorException(__FILE__, __LINE__, "Caught unknown exception" );
     }
-    
+
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -815,25 +800,25 @@
         if( resource == NULL ) {
             return;
         }
-        
+
         commands::DataStructure* dataStructure = NULL;
-        
+
         OpenWireConsumerInfo* consumer =
             dynamic_cast<OpenWireConsumerInfo*>(resource);
         OpenWireSessionInfo* session =
             dynamic_cast<OpenWireSessionInfo*>(resource);
-            
+
         if( consumer != NULL ) {
             dataStructure = consumer->getConsumerInfo();
         } else if( session != NULL ) {
             dataStructure = session->getSessionInfo();
         }
-        
+
         if( dataStructure == NULL ) {
-            throw OpenWireConnectorException(__FILE__,__LINE__, 
+            throw OpenWireConnectorException(__FILE__,__LINE__,
                 "attempting to destroy an invalid resource");
         }
-        
+
         // Dispose of this data structure at the broker.
         disposeOf( dataStructure );
 
@@ -906,7 +891,7 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 void OpenWireConnector::onTransportException(
-    transport::Transport* source,
+    transport::Transport* source AMQCPP_UNUSED,
     const exceptions::ActiveMQException& ex )
 {
     try
@@ -946,8 +931,8 @@
     try
     {
         Response* response = transport->request(command);
-        
-        commands::ExceptionResponse* exceptionResponse = dynamic_cast<commands::ExceptionResponse*>(response);
       
+
+        commands::ExceptionResponse* exceptionResponse = dynamic_cast<commands::ExceptionResponse*>(response);
         if( exceptionResponse != NULL )
         {
             // Create an exception to hold the error information.

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConsumerInfo.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConsumerInfo.h?view=diff&rev=508443&r1=508442&r2=508443
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConsumerInfo.h
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConsumerInfo.h
Fri Feb 16 07:18:58 2007
@@ -72,7 +72,7 @@
          * Gets the ID that is assigned to this consumer
          * @return value of the Consumer Id.
          */
-        virtual unsigned int getConsumerId(void) const {
+        virtual long long getConsumerId(void) const {
             if( consumerInfo != NULL ) {
                 return (unsigned int)
                     this->consumerInfo->getConsumerId()->getValue();
@@ -85,7 +85,7 @@
          * Sets the ID that is assigned to this consumer
          * @param id value of the Consumer Id.
          */
-        virtual void setConsumerId( const unsigned int id ) {
+        virtual void setConsumerId( long long int id ) {
             if( this->consumerInfo != NULL ) {
                 this->consumerInfo->getConsumerId()->setValue( id );
             }

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireProducerInfo.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireProducerInfo.h?view=diff&rev=508443&r1=508442&r2=508443
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireProducerInfo.h
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireProducerInfo.h
Fri Feb 16 07:18:58 2007
@@ -74,7 +74,7 @@
          * Gets the ID that is assigned to this Producer
          * @return value of the Producer Id.
          */
-        virtual unsigned int getProducerId(void) const {
+        virtual long long getProducerId(void) const {
             if( this->producerInfo != NULL ) {
                 return (unsigned int)
                     this->producerInfo->getProducerId()->getValue();
@@ -87,7 +87,7 @@
          * Sets the ID that is assigned to this Producer
          * @return id string value of the Producer Id.
          */
-        virtual void setProducerId( const unsigned int id ) {
+        virtual void setProducerId( long long id ) {
             if( this->producerInfo != NULL ) {
                 this->producerInfo->getProducerId()->setValue( id );
             }

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireSessionInfo.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireSessionInfo.h?view=diff&rev=508443&r1=508442&r2=508443
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireSessionInfo.h
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireSessionInfo.h
Fri Feb 16 07:18:58 2007
@@ -78,7 +78,7 @@
          * Gets the Sessions Id value
          * @return id for this session
          */
-        virtual unsigned int getSessionId(void) const {
+        virtual long long getSessionId(void) const {
             if( sessionInfo != NULL ) {
                 return (unsigned int)sessionInfo->getSessionId()->getValue();
             }
@@ -90,8 +90,10 @@
          * Sets the Session Id for this Session
          * @param id integral id value for this session
          */
-        virtual void setSessionId( const unsigned int id AMQCPP_UNUSED ) {
-            // Do nothing here
+        virtual void setSessionId( long long id ) {
+            if( sessionInfo != NULL ) {
+                sessionInfo->getSessionId()->setValue( id );
+            }
         }
 
         /**

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireTransactionInfo.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireTransactionInfo.h?view=diff&rev=508443&r1=508442&r2=508443
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireTransactionInfo.h
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireTransactionInfo.h
Fri Feb 16 07:18:58 2007
@@ -37,7 +37,7 @@
         const SessionInfo* session;
 
         // Locally generated Transaction Id
-        unsigned int transactionId;
+        long long transactionId;
 
     public:
 
@@ -50,17 +50,17 @@
 
         /**
          * Gets the Transction Id
-         * @return unsigned int Id
+         * @return integral vlaue of the Id
          */
-        virtual unsigned int getTransactionId(void) const {
+        virtual long long getTransactionId(void) const {
             return this->transactionId;
         }
 
         /**
          * Sets the Transction Id
-         * @param id unsigned int Id
+         * @param id integral value of the Id
          */
-        virtual void setTransactionId( const unsigned int id ) {
+        virtual void setTransactionId( long long id ) {
             this->transactionId = id;
         }
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompConnector.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompConnector.cpp?view=diff&rev=508443&r1=508442&r2=508443
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompConnector.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompConnector.cpp
Fri Feb 16 07:18:58 2007
@@ -95,7 +95,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-unsigned int StompConnector::getNextProducerId()
+long long StompConnector::getNextProducerId()
 {
     synchronized( &mutex )
     {
@@ -106,7 +106,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-unsigned int StompConnector::getNextTransactionId()
+long long StompConnector::getNextTransactionId()
 {
     synchronized( &mutex )
     {

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompConnector.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompConnector.h?view=diff&rev=508443&r1=508442&r2=508443
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompConnector.h
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompConnector.h
Fri Feb 16 07:18:58 2007
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
+
 #ifndef ACTIVEMQ_CONNECTOR_STOMP_STOMPCONNECTOR_H_
 #define ACTIVEMQ_CONNECTOR_STOMP_STOMPCONNECTOR_H_
 
@@ -36,7 +36,7 @@
 namespace activemq{
 namespace connector{
 namespace stomp{
-   
+
     /**
      * The connector implementation for the STOMP protocol.
      */
@@ -47,11 +47,11 @@
         public transport::TransportExceptionListener,
         public StompCommandListener
     {
-        
+
         LOGCMS_DECLARE( logger )
-        
+
     private:
-    
+
         // Flags the state we are in for connection to broker.
         enum connectionState
         {
@@ -60,86 +60,86 @@
             CONNECTED
         };
 
-        // Maps Command Ids to listener that are interested        
-        typedef std::map< commands::CommandConstants::CommandId, 
+        // Maps Command Ids to listener that are interested
+        typedef std::map< commands::CommandConstants::CommandId,
                           StompCommandListener* > CmdListenerMap;
-        
+
     private:
-    
+
         /**
          * The transport for sending/receiving commands on the wire.
          */
         transport::Transport* transport;
-        
+
         /**
          * Flag to indicate the start state of the connector.
          */
         connectionState state;
-        
+
         /**
          * Sync object.
          */
         concurrent::Mutex mutex;
-        
+
         /**
          * Observer of messages directed at a particular
          * consumer.
          */
         ConsumerMessageListener* messageListener;
-        
+
         /**
          * Observer of connector exceptions.
          */
         cms::ExceptionListener* exceptionListener;
-        
+
         /**
          * This Connector's Command Reader
          */
         StompCommandReader reader;
-        
+
         /**
          * This Connector's Command Writer
          */
         StompCommandWriter writer;
-        
+
         /**
          * Map to hold StompCommandListeners
          */
         CmdListenerMap cmdListenerMap;
-        
+
         /**
          * Session Manager object that will  be allocated when we connect
          */
         StompSessionManager* sessionManager;
-        
+
         /**
          * Next avaliable Producer Id
          */
-        unsigned int nextProducerId;
-        
+        long long nextProducerId;
+
         /**
          * Next avaliable Transaction Id
          */
-        unsigned int nextTransactionId;
-        
+        long long nextTransactionId;
+
         /**
          * Properties for the connector.
          */
         util::SimpleProperties properties;
 
     private:
-    
+
         /**
          * Sends the connect message to the broker and
          * waits for the response.
          */
         void connect();
-        
+
         /**
          * Sends a oneway disconnect message to the broker.
          */
         void disconnect();
-        
+
         /**
          * Fires a consumer message to the observer.
          * @param consumer the consumerinfo to use to fire with
@@ -148,13 +148,13 @@
         void fire( ConsumerInfo* consumer, core::ActiveMQMessage* msg ){
             try{
                 if( messageListener != NULL ){
-                    messageListener->onConsumerMessage( 
+                    messageListener->onConsumerMessage(
                         consumer,
                         msg );
                 }
             }catch( ... ){/* do nothing*/}
         }
-        
+
         /**
          * Fires an exception event to the observing object.
          * @param ex the exception to fire
@@ -166,27 +166,27 @@
                 }
             }catch( ... ){/* do nothing*/}
         }
-        
+
     public:
-    
+
         /**
          * Constructor for the stomp connector.
          * @param transport the transport object for sending/receiving
          * commands on the wire.
          * @param properties properties for configuring the connector.
          */
-        StompConnector( transport::Transport* transport, 
+        StompConnector( transport::Transport* transport,
                         const util::Properties& properties )
             throw ( exceptions::IllegalArgumentException );
 
         virtual ~StompConnector();
-        
+
         /**
          * Starts the service.
          * @throws CMSException
          */
         virtual void start() throw( cms::CMSException );
-        
+
         /**
          * Closes this object and deallocates the appropriate resources.
          * @throws CMSException
@@ -199,30 +199,30 @@
          * @return Client Id String
          */
         virtual std::string getClientId() const {
-            return properties.getProperty( 
-                core::ActiveMQConstants::toString( 
+            return properties.getProperty(
+                core::ActiveMQConstants::toString(
                     core::ActiveMQConstants::PARAM_CLIENTID ), "" );
         }
-        
+
         /**
          * Gets the Username for this connection, if this
          * connection has been closed, then this method returns ""
          * @return Username String
          */
         virtual std::string getUsername() const {
-            return properties.getProperty( 
-                core::ActiveMQConstants::toString( 
+            return properties.getProperty(
+                core::ActiveMQConstants::toString(
                     core::ActiveMQConstants::PARAM_USERNAME ), "" );
         }
-        
+
         /**
          * Gets the Password for this connection, if this
          * connection has been closed, then this method returns ""
          * @return Password String
          */
         virtual std::string getPassword() const {
-            return properties.getProperty( 
-                core::ActiveMQConstants::toString( 
+            return properties.getProperty(
+                core::ActiveMQConstants::toString(
                     core::ActiveMQConstants::PARAM_PASSWORD ), "" );
         }
 
@@ -232,7 +232,7 @@
          * @return reference to a transport
          * @throws InvalidStateException if the Transport is not set
          */
-        virtual transport::Transport& getTransport() const 
+        virtual transport::Transport& getTransport() const
             throw ( exceptions::InvalidStateException ) {
 
             if( transport == NULL ) {
@@ -241,7 +241,7 @@
                     "StompConnector::getTransport - "
                     "Invalid State, No Transport.");
             }
-            
+
             return *transport;
         }
 
@@ -252,10 +252,10 @@
          * @throws ConnectorException
          */
         virtual SessionInfo* createSession(
-            cms::Session::AcknowledgeMode ackMode ) 
+            cms::Session::AcknowledgeMode ackMode )
                 throw( ConnectorException );
-      
-        /** 
+
+        /**
          * Create a Consumer for the given Session
          * @param destination Destination to Subscribe to.
          * @param session the session this consumer is attached to
@@ -265,32 +265,32 @@
          * @throws ConnectorException
          */
         virtual ConsumerInfo* createConsumer(
-            const cms::Destination* destination, 
+            const cms::Destination* destination,
             SessionInfo* session,
             const std::string& selector = "",
             bool noLocal = false )
                 throw ( ConnectorException );
-         
-        /** 
+
+        /**
          * Create a Durable Consumer for the given Session
          * @param topic Topic to Subscribe to.
          * @param session Session Information.
          * @param name name of the Durable Topic
          * @param selector Selector String
-         * @param noLocal if set, inhibits the delivery of messages 
-         *        published by its own connection 
+         * @param noLocal if set, inhibits the delivery of messages
+         *        published by its own connection
          * @return Consumer Information
          * @throws ConnectorException
          */
         virtual ConsumerInfo* createDurableConsumer(
-            const cms::Topic* topic, 
+            const cms::Topic* topic,
             SessionInfo* session,
             const std::string& name,
             const std::string& selector = "",
             bool noLocal = false )
                 throw ( ConnectorException );
 
-        /** 
+        /**
          * Create a Consumer for the given Session
          * @param destination Destination to Subscribe to.
          * @param session Session Information.
@@ -298,7 +298,7 @@
          * @throws ConnectorException
          */
         virtual ProducerInfo* createProducer(
-            const cms::Destination* destination, 
+            const cms::Destination* destination,
             SessionInfo* session )
                 throw ( ConnectorException );
 
@@ -309,10 +309,10 @@
          * @return a newly created Topic Object
          * @throws ConnectorException
          */
-        virtual cms::Topic* createTopic( const std::string& name, 
+        virtual cms::Topic* createTopic( const std::string& name,
                                          SessionInfo* session )
             throw ( ConnectorException );
-          
+
         /**
          * Creates a Queue given a name and session info
          * @param name Queue Name
@@ -320,7 +320,7 @@
          * @return a newly created Queue Object
          * @throws ConnectorException
          */
-        virtual cms::Queue* createQueue( const std::string& name, 
+        virtual cms::Queue* createQueue( const std::string& name,
                                          SessionInfo* session )
             throw ( ConnectorException );
 
@@ -333,7 +333,7 @@
         virtual cms::TemporaryTopic* createTemporaryTopic(
             SessionInfo* session )
                 throw ( ConnectorException );
-          
+
         /**
          * Creates a Temporary Queue given a name and session info
          * @param session Session Information
@@ -350,9 +350,9 @@
          * @param producerInfo Producer Info for the sender of this message
          * @throws ConnectorException
          */
-        virtual void send( cms::Message* message, ProducerInfo* producerInfo ) 
+        virtual void send( cms::Message* message, ProducerInfo* producerInfo )
             throw ( ConnectorException );
-      
+
         /**
          * Sends a set of Messages
          * @param messages List of Messages to send.
@@ -360,9 +360,9 @@
          * @throws ConnectorException
          */
         virtual void send( std::list<cms::Message*>& messages,
-                           ProducerInfo* producerInfo ) 
+                           ProducerInfo* producerInfo )
             throw ( ConnectorException );
-         
+
         /**
          * Acknowledges a Message
          * @param session An ActiveMQMessage to Ack.
@@ -381,16 +381,16 @@
          * @throws ConnectorException
          */
         virtual TransactionInfo* startTransaction(
-            SessionInfo* session ) 
+            SessionInfo* session )
                 throw ( ConnectorException );
-         
+
         /**
          * Commits a Transaction.
          * @param transaction The Transaction information
          * @param session Session Information
          * @throws ConnectorException
          */
-        virtual void commit( TransactionInfo* transaction, 
+        virtual void commit( TransactionInfo* transaction,
                              SessionInfo* session )
             throw ( ConnectorException );
 
@@ -400,7 +400,7 @@
          * @param session Session Information
          * @throws ConnectorException
          */
-        virtual void rollback( TransactionInfo* transaction, 
+        virtual void rollback( TransactionInfo* transaction,
                                SessionInfo* session )
             throw ( ConnectorException );
 
@@ -448,7 +448,7 @@
             TransactionInfo* transaction )
                 throw ( ConnectorException );
 
-        /** 
+        /**
          * Unsubscribe from a givenDurable Subscription
          * @param name name of the Subscription
          * @throws ConnectorException
@@ -463,8 +463,8 @@
          */
         virtual void destroyResource( ConnectorResource* resource )
             throw ( ConnectorException );
-            
-        /** 
+
+        /**
          * Sets the listener of consumer messages.
          * @param listener listener the observer.
          */
@@ -472,14 +472,14 @@
             ConsumerMessageListener* listener )
         {
             this->messageListener = listener;
-            
+
             if(sessionManager != NULL)
             {
                 sessionManager->setConsumerMessageListener( listener );
             }
         }
 
-        /** 
+        /**
          * Sets the Listner of exceptions for this connector
          * @param listener ExceptionListener the observer.
          */
@@ -488,16 +488,16 @@
         {
             this->exceptionListener = listener;
         }
-        
+
     public: // transport::CommandListener
-    
+
         /**
-         * Event handler for the receipt of a non-response command from the 
+         * Event handler for the receipt of a non-response command from the
          * transport.
          * @param command command the received command object.
          */
         virtual void onCommand( transport::Command* command );
-        
+
     public: // TransportExceptionListener
 
         /**
@@ -505,8 +505,8 @@
          * @param source The source of the exception
          * @param ex The exception.
          */
-        virtual void onTransportException( 
-            transport::Transport* source, 
+        virtual void onTransportException(
+            transport::Transport* source,
             const exceptions::ActiveMQException& ex );
 
     public: // StompCommandListener
@@ -516,11 +516,11 @@
          * @param command command to process
          * @throw ConnterException
          */
-        virtual void onStompCommand( commands::StompCommand* command ) 
-            throw ( StompConnectorException );    
+        virtual void onStompCommand( commands::StompCommand* command )
+            throw ( StompConnectorException );
 
     public:
-    
+
         /**
          * Registers a Command Listener using the CommandId specified
          * if there is already a listener for that command it will be
@@ -528,25 +528,25 @@
          * @param commandId CommandId to process
          * @param listener pointer to the listener to call
          */
-        virtual void addCmdListener( 
+        virtual void addCmdListener(
             commands::CommandConstants::CommandId commandId,
             StompCommandListener* listener );
-        
+
         /**
          * UnRegisters a Command Listener using the CommandId specified
          * @param commandId CommandId of the listener to remove.
          */
-        virtual void removeCmdListener( 
+        virtual void removeCmdListener(
             commands::CommandConstants::CommandId commandId );
-        
+
     private:
-    
-        unsigned int getNextProducerId();
-        unsigned int getNextTransactionId();
+
+        long long getNextProducerId();
+        long long getNextTransactionId();
 
         // Check for Connected State and Throw an exception if not.
         void enforceConnected() throw ( ConnectorException );
-        
+
     };
 
 }}}

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompConsumerInfo.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompConsumerInfo.h?view=diff&rev=508443&r1=508442&r2=508443
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompConsumerInfo.h
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompConsumerInfo.h
Fri Feb 16 07:18:58 2007
@@ -30,7 +30,7 @@
         std::string selector;
 
         // Consumer Id
-        unsigned int consumerId;
+        long long consumerId;
 
         // Destination
         cms::Destination* destination;
@@ -69,7 +69,7 @@
          * Gets the ID that is assigned to this consumer
          * @return value of the Consumer Id.
          */
-        virtual unsigned int getConsumerId(void) const {
+        virtual long long getConsumerId(void) const {
             return consumerId;
         }
 
@@ -77,7 +77,7 @@
          * Sets the ID that is assigned to this consumer
          * @param id value of the Consumer Id.
          */
-        virtual void setConsumerId( const unsigned int id ) {
+        virtual void setConsumerId( long long id ) {
             this->consumerId = id;
         }
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompProducerInfo.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompProducerInfo.h?view=diff&rev=508443&r1=508442&r2=508443
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompProducerInfo.h
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompProducerInfo.h
Fri Feb 16 07:18:58 2007
@@ -30,7 +30,7 @@
     private:
 
         // Producer Id
-        unsigned int producerId;
+        long long producerId;
 
         // Default Destination
         cms::Destination* destination;
@@ -68,7 +68,7 @@
          * Gets the ID that is assigned to this Producer
          * @return value of the Producer Id.
          */
-        virtual unsigned int getProducerId(void) const {
+        virtual long long getProducerId(void) const {
             return producerId;
         }
 
@@ -76,7 +76,7 @@
          * Sets the ID that is assigned to this Producer
          * @return id string value of the Producer Id.
          */
-        virtual void setProducerId( const unsigned int id ) {
+        virtual void setProducerId( long long id ) {
             this->producerId = id;
         }
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompSessionInfo.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompSessionInfo.h?view=diff&rev=508443&r1=508442&r2=508443
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompSessionInfo.h
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompSessionInfo.h
Fri Feb 16 07:18:58 2007
@@ -37,7 +37,7 @@
         std::string connectionId;
 
         // The unique session id
-        unsigned int sessionId;
+        long long sessionId;
 
         // Info for this sessions current transaction
         const TransactionInfo* transaction;
@@ -75,7 +75,7 @@
          * Gets the Sessions Id value
          * @return id for this session
          */
-        virtual unsigned int getSessionId(void) const {
+        virtual long long getSessionId(void) const {
             return sessionId;
         }
 
@@ -83,7 +83,7 @@
          * Sets the Session Id for this Session
          * @param id integral id value for this session
          */
-        virtual void setSessionId( const unsigned int id ) {
+        virtual void setSessionId( long long id ) {
             this->sessionId = id;
         }
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompTransactionInfo.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompTransactionInfo.h?view=diff&rev=508443&r1=508442&r2=508443
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompTransactionInfo.h
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompTransactionInfo.h
Fri Feb 16 07:18:58 2007
@@ -27,13 +27,13 @@
     class StompTransactionInfo : public connector::TransactionInfo
     {
     private:
-    
+
         // Transaction Id
-        unsigned int transactionId;
-        
+        long long transactionId;
+
         // Session Info - We do not own this
         const SessionInfo* session;
-        
+
     public:
 
         /**
@@ -48,19 +48,19 @@
 
         /**
          * Gets the Transction Id
-         * @return unsigned int Id
+         * @return long long Id
          */
-        virtual unsigned int getTransactionId(void) const {
+        virtual long long getTransactionId(void) const {
             return transactionId;
         }
 
         /**
          * Sets the Transction Id
-         * @param id unsigned int Id
+         * @param id long long Id
          */
-        virtual void setTransactionId( const unsigned int id ) {
+        virtual void setTransactionId( long long id ) {
             this->transactionId = id;
-        } 
+        }
 
         /**
          * Gets the Session Info that this Transction is attached too
@@ -69,7 +69,7 @@
         virtual const SessionInfo* getSessionInfo(void) const {
             return session;
         }
-        
+
         /**
          * Gets the Session Info that this Transction is attached too
          * @return session SessionnInfo pointer

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQTransaction.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQTransaction.h?view=diff&rev=508443&r1=508442&r2=508443
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQTransaction.h
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQTransaction.h
Fri Feb 16 07:18:58 2007
@@ -46,60 +46,60 @@
      * running transaction, when it is committed or rolled back it silently
      * creates a new transaction for the next set of messages.  The only
      * way to permanently end this tranaction is to delete it.
-     * 
+     *
      * Configuration options
-     * 
+     *
      * transaction.redeliveryDelay
      *   Wait time between the redelivery of each message
-     * 
+     *
      * transaction.maxRedeliveryCount
-     *   Max number of times a message can be redelivered, if the session is 
+     *   Max number of times a message can be redelivered, if the session is
      *   rolled back more than this many time, the message is dropped.
-     */                        
+     */
     class ActiveMQTransaction : public concurrent::TaskListener,
                                 public connector::TransactionInfo,
                                 public ActiveMQSessionResource
     {
     private:
-    
+
         // List type for holding messages
         typedef std::list< ActiveMQMessage* > MessageList;
-                
+
         // Mapping of MessageListener Ids to Lists of Messages that are
         // redelivered on a Rollback
         typedef std::map< ActiveMQMessageListener*, MessageList > RollbackMap;
-       
+
     private:
-    
+
         // Connection this Transaction is associated with
         ActiveMQConnection* connection;
-        
+
         // Session this Transaction is associated with
-        ActiveMQSession* session;        
-        
+        ActiveMQSession* session;
+
         // Transaction Info for the current Transaction
         connector::TransactionInfo* transactionInfo;
-        
+
         // Map of ActiveMQMessageListener to Messages to Rollback
         RollbackMap rollbackMap;
-        
+
         // Lock object to protect the rollback Map
         concurrent::Mutex rollbackLock;
-        
+
         // Max number of redeliveries before we quit
         int maxRedeliveries;
-        
+
         // Wait time between sends of message on a rollback
         int redeliveryDelay;
-        
+
         // Mutex that is signaled when all tasks complete.
         concurrent::Mutex tasksDone;
-        
+
         // Count of Tasks that are outstanding
         int taskCount;
 
     public:
-    
+
         /**
          * Constructor
          * @param connection - Connection to the Broker
@@ -109,9 +109,9 @@
     	ActiveMQTransaction( ActiveMQConnection* connection,
                              ActiveMQSession* session,
                              const util::Properties& properties );
-    
+
         virtual ~ActiveMQTransaction(void);
-                                  
+
         /**
          * Adds the Message as a part of the Transaction for the specified
          * ActiveMQConsumer.
@@ -120,29 +120,29 @@
          */
         virtual void addToTransaction( ActiveMQMessage* message,
                                        ActiveMQMessageListener* listener );
-                                      
+
         /**
-         * Removes the ActiveMQMessageListener and all of its transacted 
-         * messages from the Transaction, this is usually only done when 
+         * Removes the ActiveMQMessageListener and all of its transacted
+         * messages from the Transaction, this is usually only done when
          * a ActiveMQMessageListener is destroyed.
          * @param listener - consumer who is to be removed.
          */
         virtual void removeFromTransaction( ActiveMQMessageListener* listener );
-        
+
         /**
          * Commit the current Transaction
          * @throw CMSException
          */
         virtual void commit(void) throw ( exceptions::ActiveMQException );
-        
+
         /**
          * Rollback the current Transaction
          * @throw CMSException
          */
         virtual void rollback(void) throw ( exceptions::ActiveMQException );
-        
+
         /**
-         * Get the Transaction Information object for the current 
+         * Get the Transaction Information object for the current
          * Transaction, returns NULL if no transaction is running
          * @return TransactionInfo
          */
@@ -154,17 +154,17 @@
 
         /**
          * Gets the Transction Id
-         * @return unsigned int Id
+         * @return integral value of Id
          */
-        virtual unsigned int getTransactionId(void) const {
+        virtual long long getTransactionId(void) const {
             return transactionInfo->getTransactionId();
         }
 
         /**
          * Sets the Transction Id
-         * @param id - unsigned int Id
+         * @param id - integral value of Id
          */
-        virtual void setTransactionId( const unsigned int id ) {
+        virtual void setTransactionId( long long id ) {
             transactionInfo->setTransactionId( id );
         }
 
@@ -185,7 +185,7 @@
         }
 
     protected:   // Task Listener Interface
-    
+
         /**
          * Called when a queued task has completed, the task that
          * finished is passed along for user consumption.  The task is
@@ -193,21 +193,21 @@
          * @param task - Runnable Pointer to the task that finished
          */
         virtual void onTaskComplete( concurrent::Runnable* task );
-           
+
          /**
           * Called when a queued task has thrown an exception while
-          * being run.  The Callee should assume that this was an 
+          * being run.  The Callee should assume that this was an
           * unrecoverable exeption and that this task is now defunct.
           * Deletes the Task and notifies the connection that the
           * exception has occurred.  Reduce the outstanding task count.
           * @param task - Runnable Pointer to the task
           * @param ex - The ActiveMQException that was thrown.
           */
-         virtual void onTaskException( concurrent::Runnable* task, 
+         virtual void onTaskException( concurrent::Runnable* task,
                                        exceptions::ActiveMQException& ex );
 
     public:  // ActiveMQSessionResource
-    
+
         /**
          * Retrieve the Connector resource that is associated with
          * this Session resource.
@@ -218,26 +218,26 @@
         }
 
     protected:
-    
+
         /**
-         * Clean out all Messages from the Rollback Map, deleting the 
-         * messages as it goes.  Destroys the Transaction Info object as 
+         * Clean out all Messages from the Rollback Map, deleting the
+         * messages as it goes.  Destroys the Transaction Info object as
          * well.
          * @throw ActiveMQException
          */
         virtual void clearTransaction(void);
 
     private:
-    
+
         // Internal class that is used to redeliver one consumers worth
         // of messages from this transaction.
         class RollbackTask : public concurrent::Runnable
         {
         private:
-        
+
             // Wait time before redelivery in millisecs
             int redeliveryDelay;
-            
+
             // Max number of time to redeliver this message
             int maxRedeliveries;
 
@@ -246,10 +246,10 @@
 
             // Consumer we are redelivering to
             ActiveMQMessageListener* listener;
-            
+
             // Connection to use for sending message acks
             ActiveMQConnection* connection;
-            
+
             // Session for this Transaction
             ActiveMQSession* session;
 
@@ -261,7 +261,7 @@
                           MessageList& messages,
                           int maxRedeliveries,
                           int redeliveryDelay ){
-                            
+
                 // Store State Data.
                 this->messages        = messages;
                 this->listener        = listener;



Mime
View raw message