[asterisk-scf-commits] asterisk-scf/integration/servicediscovery.git branch "retry_deux" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Thu May 3 11:04:11 CDT 2012


branch "retry_deux" has been updated
       via  66909960f4925507579eeae27a15daeb55368bb1 (commit)
      from  506a284ecd1d4c1870ea13be46979bcf1b078643 (commit)

Summary of changes:
 src/ServiceLocator.cpp |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)


- Log -----------------------------------------------------------------
commit 66909960f4925507579eeae27a15daeb55368bb1
Author: Ken Hunt <ken.hunt at digium.com>
Date:   Thu May 3 11:05:41 2012 -0500

    Some extra logging, and better handling of the client thread pool size.

diff --git a/src/ServiceLocator.cpp b/src/ServiceLocator.cpp
index bc2f426..7115b6f 100644
--- a/src/ServiceLocator.cpp
+++ b/src/ServiceLocator.cpp
@@ -117,6 +117,8 @@ public:
 
         try
         {
+            lg(Info) << "ServiceLocator activate() received...";
+
             // it's not good to loop through the listeners while holding the lock, so make a copy
             vector<ReplicaListenerPrx> listeners;
             {
@@ -127,9 +129,11 @@ public:
 
             if (mServiceLocatorApp)
             {
+                lg(Info) << "ServiceLocator activate() calling the app's callback...";
                 mServiceLocatorApp->activated();
             }
 
+            lg(Info) << "ServiceLocator activate() notifying listeners...";
             for (vector<ReplicaListenerPrx>::const_iterator listener = listeners.begin();
                  listener != listeners.end();
                  ++listener)
@@ -313,7 +317,8 @@ void ServiceLocatorApp::verifyProperties()
     defaultPoolSize = mCommunicator->getProperties()->getPropertyAsIntWithDefault("Ice.ThreadPool.Client.Size", 0);
     if (defaultPoolSize < defaultSize)
     {
-        lg(Warning) << "Client thread pool size is too small, defaulting to " << strDefaultSize;
+        lg(Warning) << "Client thread pool size of " << defaultPoolSize << " is too small! Set to " << strDefaultSize << " or greater.";
+        assert(false);
     }
 
 }
@@ -473,18 +478,26 @@ void ServiceLocatorApp::start(const string& appName, const Ice::CommunicatorPtr&
 
 void ServiceLocatorApp::activated()
 {
+    lg(Info) << "App activated callback entered.";
+
     if (!mStandalone)
     {
+        
+        lg(Info) << "  Removing listener from Replicator";
         // Stop listening to state replicator.
         mStateReplicator->removeListener(AsteriskSCF::Operations::createContext(), mReplicatorListenerProxy);
     }
 
+    lg(Info) << "  Creating topic manager";
     ServiceManagementPrx icestormManagement = mLocatorServiceManagement->addService(
     AsteriskSCF::Operations::createContext(), mTopicManager, "TopicManager", Ice::Current());
     ServiceLocatorParamsPtr params = new ServiceLocatorParams;
     params->category = TopicManagerCategory;
     params->service = "default";
+
+    lg(Info) << "  Adding locator params for topic manager";
     icestormManagement->addLocatorParams(AsteriskSCF::Operations::createContext(), params, "");
+    lg(Info) << "Activated callback complete";
 }
 
 void ServiceLocatorApp::onStandby()

-----------------------------------------------------------------------


-- 
asterisk-scf/integration/servicediscovery.git



More information about the asterisk-scf-commits mailing list