You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2010/07/09 01:02:39 UTC

svn commit: r961973 - in /activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq: commands/ConnectionInfo.cpp commands/ConnectionInfo.h state/ConnectionStateTracker.cpp wireformat/openwire/marshal/generated/ConnectionInfoMarshaller.cpp

Author: tabish
Date: Thu Jul  8 23:02:38 2010
New Revision: 961973

URL: http://svn.apache.org/viewvc?rev=961973&view=rev
Log:
Update Commands and State Tracker.

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ConnectionInfo.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ConnectionInfo.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/state/ConnectionStateTracker.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/generated/ConnectionInfoMarshaller.cpp

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ConnectionInfo.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ConnectionInfo.cpp?rev=961973&r1=961972&r2=961973&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ConnectionInfo.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ConnectionInfo.cpp Thu Jul  8 23:02:38 2010
@@ -40,7 +40,7 @@ using namespace decaf::lang::exceptions;
 ////////////////////////////////////////////////////////////////////////////////
 ConnectionInfo::ConnectionInfo() 
     : BaseCommand(), connectionId(NULL), clientId(""), password(""), userName(""), brokerPath(), brokerMasterConnector(false), 
-      manageable(false), clientMaster(false), faultTolerant(false) {
+      manageable(false), clientMaster(false), faultTolerant(false), failoverReconnect(false) {
 
 }
 
@@ -86,6 +86,7 @@ void ConnectionInfo::copyDataStructure( 
     this->setManageable( srcPtr->isManageable() );
     this->setClientMaster( srcPtr->isClientMaster() );
     this->setFaultTolerant( srcPtr->isFaultTolerant() );
+    this->setFailoverReconnect( srcPtr->isFailoverReconnect() );
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -137,6 +138,8 @@ std::string ConnectionInfo::toString() c
     stream << "ClientMaster = " << this->isClientMaster();
     stream << ", ";
     stream << "FaultTolerant = " << this->isFaultTolerant();
+    stream << ", ";
+    stream << "FailoverReconnect = " << this->isFailoverReconnect();
     stream << " }";
 
     return stream.str();
@@ -192,6 +195,9 @@ bool ConnectionInfo::equals( const DataS
     if( this->isFaultTolerant() != valuePtr->isFaultTolerant() ) {
         return false;
     }
+    if( this->isFailoverReconnect() != valuePtr->isFailoverReconnect() ) {
+        return false;
+    }
     if( !BaseCommand::equals( value ) ) {
         return false;
     }
@@ -314,6 +320,16 @@ void ConnectionInfo::setFaultTolerant( b
 }
 
 ////////////////////////////////////////////////////////////////////////////////
+bool ConnectionInfo::isFailoverReconnect() const {
+    return failoverReconnect;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void ConnectionInfo::setFailoverReconnect( bool failoverReconnect ) {
+    this->failoverReconnect = failoverReconnect;
+}
+
+////////////////////////////////////////////////////////////////////////////////
 decaf::lang::Pointer<commands::Command> ConnectionInfo::visit( activemq::state::CommandVisitor* visitor ) {
 
     return visitor->processConnectionInfo( this );

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ConnectionInfo.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ConnectionInfo.h?rev=961973&r1=961972&r2=961973&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ConnectionInfo.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ConnectionInfo.h Thu Jul  8 23:02:38 2010
@@ -58,6 +58,7 @@ namespace commands{
         bool manageable;
         bool clientMaster;
         bool faultTolerant;
+        bool failoverReconnect;
 
     public:
 
@@ -118,6 +119,9 @@ namespace commands{
         virtual bool isFaultTolerant() const;
         virtual void setFaultTolerant( bool faultTolerant );
 
+        virtual bool isFailoverReconnect() const;
+        virtual void setFailoverReconnect( bool failoverReconnect );
+
         /**
          * @return an answer of true to the isConnectionInfo() query.
          */

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/state/ConnectionStateTracker.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/state/ConnectionStateTracker.cpp?rev=961973&r1=961972&r2=961973&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/state/ConnectionStateTracker.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/state/ConnectionStateTracker.cpp Thu Jul  8 23:02:38 2010
@@ -124,7 +124,11 @@ void ConnectionStateTracker::restore( co
 
         for( ; iter != connectionStates.end(); ++iter ) {
             Pointer<ConnectionState> state = *iter;
-            transport->oneway( state->getInfo() );
+
+            Pointer<ConnectionInfo> info = state->getInfo();
+            info->setFailoverReconnect( true );
+            transport->oneway( info );
+
             doRestoreTempDestinations( transport, state );
 
             if( restoreSessions ) {

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/generated/ConnectionInfoMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/generated/ConnectionInfoMarshaller.cpp?rev=961973&r1=961972&r2=961973&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/generated/ConnectionInfoMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/generated/ConnectionInfoMarshaller.cpp Thu Jul  8 23:02:38 2010
@@ -86,6 +86,9 @@ void ConnectionInfoMarshaller::tightUnma
         if( wireVersion >= 6 ) {
             info->setFaultTolerant( bs->readBoolean() );
         }
+        if( wireVersion >= 6 ) {
+            info->setFailoverReconnect( bs->readBoolean() );
+        }
     }
     AMQ_CATCH_RETHROW( decaf::io::IOException )
     AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException )
@@ -117,6 +120,9 @@ int ConnectionInfoMarshaller::tightMarsh
         if( wireVersion >= 6 ) {
             bs->writeBoolean( info->isFaultTolerant() );
         }
+        if( wireVersion >= 6 ) {
+            bs->writeBoolean( info->isFailoverReconnect() );
+        }
 
         return rc + 0;
     }
@@ -150,6 +156,9 @@ void ConnectionInfoMarshaller::tightMars
         if( wireVersion >= 6 ) {
             bs->readBoolean();
         }
+        if( wireVersion >= 6 ) {
+            bs->readBoolean();
+        }
     }
     AMQ_CATCH_RETHROW( decaf::io::IOException )
     AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException )
@@ -191,6 +200,9 @@ void ConnectionInfoMarshaller::looseUnma
         if( wireVersion >= 6 ) {
             info->setFaultTolerant( dataIn->readBoolean() );
         }
+        if( wireVersion >= 6 ) {
+            info->setFailoverReconnect( dataIn->readBoolean() );
+        }
     }
     AMQ_CATCH_RETHROW( decaf::io::IOException )
     AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException )
@@ -221,6 +233,9 @@ void ConnectionInfoMarshaller::looseMars
         if( wireVersion >= 6 ) {
             dataOut->writeBoolean( info->isFaultTolerant() );
         }
+        if( wireVersion >= 6 ) {
+            dataOut->writeBoolean( info->isFailoverReconnect() );
+        }
     }
     AMQ_CATCH_RETHROW( decaf::io::IOException )
     AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException )