[asterisk-scf-commits] asterisk-scf/integration/servicediscover.git branch "retry_deux" created.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Fri Mar 2 10:30:40 CST 2012


branch "retry_deux" has been created
        at  18067f50f298bc5f9033d93f62f2799c7dfe0b22 (commit)

- Log -----------------------------------------------------------------
commit 18067f50f298bc5f9033d93f62f2799c7dfe0b22
Author: Brent Eagles <beagles at digium.com>
Date:   Fri Mar 2 12:58:40 2012 -0330

    Build fixes for recent slice changes

diff --git a/slice/AsteriskSCF/Replication/ServiceLocator/ServiceLocatorStateReplicationIf.ice b/slice/AsteriskSCF/Replication/ServiceLocator/ServiceLocatorStateReplicationIf.ice
old mode 100644
new mode 100755
index 3ec0dd1..e502784
--- a/slice/AsteriskSCF/Replication/ServiceLocator/ServiceLocatorStateReplicationIf.ice
+++ b/slice/AsteriskSCF/Replication/ServiceLocator/ServiceLocatorStateReplicationIf.ice
@@ -19,6 +19,7 @@
 #include <Ice/BuiltinSequences.ice>
 #include <Ice/Identity.ice>
 #include "AsteriskSCF/Core/Discovery/ServiceLocatorIf.ice"
+#include <AsteriskSCF/System/OperationsIf.ice>
 
 module AsteriskSCF
 {
@@ -41,16 +42,16 @@ module V1
 
    interface ServiceLocatorStateReplicatorListener
    {
-	   void stateRemoved(Ice::StringSeq itemKeys);
-	   void stateSet(ServiceLocatorStateItemSeq items);
+	   void stateRemoved(AsteriskSCF::System::V1::OperationContext operationContext, Ice::StringSeq itemKeys);
+	   void stateSet(AsteriskSCF::System::V1::OperationContext operationContext, ServiceLocatorStateItemSeq items);
    };
 
    interface ServiceLocatorStateReplicator
    {
-	   void addListener(ServiceLocatorStateReplicatorListener *listener);
-	   void removeListener(ServiceLocatorStateReplicatorListener *listener);
-	   void setState (ServiceLocatorStateItemSeq items);
-	   void removeState(Ice::StringSeq items);
+	   void addListener(AsteriskSCF::System::V1::OperationContext operationContext, ServiceLocatorStateReplicatorListener *listener);
+	   void removeListener(AsteriskSCF::System::V1::OperationContext operationContext, ServiceLocatorStateReplicatorListener *listener);
+	   void setState (AsteriskSCF::System::V1::OperationContext operationContext, ServiceLocatorStateItemSeq items);
+	   void removeState(AsteriskSCF::System::V1::OperationContext operationContext, Ice::StringSeq items);
 	   idempotent ServiceLocatorStateItemSeq getState(Ice::StringSeq itemKeys);
 	   idempotent ServiceLocatorStateItemSeq getAllState();
    };
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
old mode 100644
new mode 100755
index 6a91640..85d3f77
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -23,5 +23,5 @@ astscf_component_add_files(ServiceLocatorStateReplicator ServiceLocatorStateRepl
 astscf_component_add_ice_libraries(ServiceLocatorStateReplicator IceStorm)
 astscf_component_add_boost_libraries(ServiceLocatorStateReplicator thread date_time)
 astscf_component_build_icebox(ServiceLocatorStateReplicator)
-target_link_libraries(ServiceLocatorStateReplicator LoggingClient)
+target_link_libraries(ServiceLocatorStateReplicator LoggingClient ASTSCFIceUtilCpp)
 astscf_component_install(ServiceLocatorStateReplicator)
diff --git a/src/ServiceLocator.cpp b/src/ServiceLocator.cpp
index 6edfc3e..fe1241a 100644
--- a/src/ServiceLocator.cpp
+++ b/src/ServiceLocator.cpp
@@ -13,6 +13,12 @@
  * the GNU General Public License Version 2. See the LICENSE.txt file
  * at the top of the source tree.
  */
+  
+//
+// These are moved up in include order because boost seems to have some kind of name collision on Windows.
+//
+#include <boost/thread.hpp>
+#include <boost/thread/shared_mutex.hpp>
 
 #include <Ice/Ice.h>
 #include <IceStorm/IceStorm.h>
@@ -25,7 +31,7 @@
 #include <AsteriskSCF/Logger/IceLogger.h>
 #include <AsteriskSCF/System/Component/ReplicaIf.h>
 #include <AsteriskSCF/CollocatedIceStorm/CollocatedIceStorm.h>
-#include <AsteriskSCF/Helpers/OperationContext.h>
+#include <AsteriskSCF/Operations/OperationContext.h>
 
 #include "ServiceLocatorManagement.h"
 #include "ServiceManagement.h"
@@ -79,34 +85,36 @@ public:
         return mActive;
     }
 
-    bool activate(const Ice::Current&)
+    bool activate(const AsteriskSCF::System::V1::OperationContextPtr& context, const Ice::Current&)
     {
         mActive = true;
 
         for (vector<AsteriskSCF::System::Component::V1::ReplicaListenerPrx>::const_iterator listener = mListeners.begin(); listener != mListeners.end(); ++listener)
         {
-            (*listener)->activated(ReplicaPrx::uncheckedCast(mAdapter->createDirectProxy(mAdapter->getCommunicator()->stringToIdentity(ReplicaServiceId))));
+            (*listener)->activated(AsteriskSCF::Operations::createContext(context),
+                ReplicaPrx::uncheckedCast(mAdapter->createDirectProxy(mAdapter->getCommunicator()->stringToIdentity(ReplicaServiceId))));
         }
 
         return true;
     }
 
-    void standby(const Ice::Current&)
+    void standby(const AsteriskSCF::System::V1::OperationContextPtr& context, const Ice::Current&)
     {
         mActive = false;
 
         for (vector<AsteriskSCF::System::Component::V1::ReplicaListenerPrx>::const_iterator listener = mListeners.begin(); listener != mListeners.end(); ++listener)
         {
-            (*listener)->onStandby(ReplicaPrx::uncheckedCast(mAdapter->createDirectProxy(mAdapter->getCommunicator()->stringToIdentity(ReplicaServiceId))));
+            (*listener)->onStandby(AsteriskSCF::Operations::createContext(context),
+                ReplicaPrx::uncheckedCast(mAdapter->createDirectProxy(mAdapter->getCommunicator()->stringToIdentity(ReplicaServiceId))));
         }
     }
 
-    void addListener(const AsteriskSCF::System::Component::V1::ReplicaListenerPrx& listener, const Ice::Current&)
+    void addListener(const AsteriskSCF::System::V1::OperationContextPtr&, const AsteriskSCF::System::Component::V1::ReplicaListenerPrx& listener, const Ice::Current&)
     {
         mListeners.push_back(listener);
     }
 
-    void removeListener(const AsteriskSCF::System::Component::V1::ReplicaListenerPrx& listener, const Ice::Current&)
+    void removeListener(const AsteriskSCF::System::V1::OperationContextPtr&, const AsteriskSCF::System::Component::V1::ReplicaListenerPrx& listener, const Ice::Current&)
     {
         mListeners.erase(std::remove(mListeners.begin(), mListeners.end(), listener), mListeners.end());
     }
@@ -259,7 +267,7 @@ void ServiceLocatorApp::start(const string& appName, const Ice::CommunicatorPtr&
 
         if (getBooleanPropertyValueWithDefault(communicator->getProperties(), appName + ".Standalone", false))
         {
-	    mReplicaService->standby();
+	    mReplicaService->standby(AsteriskSCF::Operations::createContext());
             mStateReplicator->addListener(replicatorListenerProxy);
             lg(Info) << "Operating as a standby replica." << endl;
         }
@@ -294,11 +302,12 @@ void ServiceLocatorApp::start(const string& appName, const Ice::CommunicatorPtr&
     // we will replicate it.
     if (mReplicaService->isActive() == true)
     {
-	ServiceManagementPrx icestormManagement = locatorServiceManagement->addService(topicManager, "TopicManager", Ice::Current());
+	ServiceManagementPrx icestormManagement = locatorServiceManagement->addService(
+            AsteriskSCF::Operations::createContext(), topicManager, "TopicManager", Ice::Current());
 	ServiceLocatorParamsPtr params = new ServiceLocatorParams;
 	params->category = TopicManagerCategory;
 	params->service = "default";
-	icestormManagement->addLocatorParams(AsteriskSCF::createContext(), params, "");
+	icestormManagement->addLocatorParams(AsteriskSCF::Operations::createContext(), params, "");
     }
 
     mDiscoveryAdapter->activate();
diff --git a/src/ServiceLocatorManagement.cpp b/src/ServiceLocatorManagement.cpp
index 0a953c8..b8e6312 100644
--- a/src/ServiceLocatorManagement.cpp
+++ b/src/ServiceLocatorManagement.cpp
@@ -14,16 +14,20 @@
  * at the top of the source tree.
  */
 
-#include <Ice/Ice.h>
-#include <IceUtil/UUID.h>
-
+//
+// These are moved up in include order because boost seems to have some kind of name collision on Windows.
+//
 #include <boost/thread.hpp>
 #include <boost/thread/shared_mutex.hpp>
 
+#include <Ice/Ice.h>
+#include <IceUtil/UUID.h>
+
 #include <AsteriskSCF/Core/Discovery/ServiceLocatorIf.h>
 #include <AsteriskSCF/Core/Discovery/ServiceLocatorEventsIf.h>
 #include <AsteriskSCF/Logger.h>
 #include <AsteriskSCF/Async/ResponseCollector.h>
+#include <AsteriskSCF/Operations/OperationContext.h>
 
 #include "ServiceLocatorStateReplicationIf.h"
 
@@ -420,6 +424,7 @@ void ServiceLocatorManagementImpl::locateAll(
  * Implementation of the addService method as defined in service_locator.ice
  */
 ServiceManagementPrx ServiceLocatorManagementImpl::addService(
+    const AsteriskSCF::System::V1::OperationContextPtr&,
     const Ice::ObjectPrx& service, const string& guid, const Ice::Current&)
 {
     lg(Debug) << "addService(" << guid << ')';
@@ -484,7 +489,7 @@ ServiceInfo ServiceLocatorManagementImpl::getService(const std::string &guid, co
 /**
  * Implementation of the addCompare method as defined in service_locator.ice
  */
-void ServiceLocatorManagementImpl::addCompare(const string& guid,
+void ServiceLocatorManagementImpl::addCompare(const AsteriskSCF::System::V1::OperationContextPtr& context, const string& guid,
     const ServiceLocatorParamsComparePrx& service, const Ice::Current&)
 {
     lg(Debug) << "addCompare(" << guid << ')';
@@ -500,14 +505,15 @@ void ServiceLocatorManagementImpl::addCompare(const string& guid,
 
     if (mImpl->mLocatorTopic)
     {
-        mImpl->mLocatorTopic->comparisonRegistered(guid);
+        mImpl->mLocatorTopic->comparisonRegistered(AsteriskSCF::Operations::createContext(context), guid);
     }
 }
 
 /**
  * Implementation of the removeCompare method as defined in service_locator.ice
  */
-void ServiceLocatorManagementImpl::removeCompare(const string& guid, const Ice::Current&)
+void ServiceLocatorManagementImpl::removeCompare(const AsteriskSCF::System::V1::OperationContextPtr& context, 
+    const string& guid, const Ice::Current&)
 {
     lg(Debug) << "removeCompare(" << guid << ')';
     boost::unique_lock<boost::shared_mutex> lock(mImpl->mLock);
@@ -519,7 +525,7 @@ void ServiceLocatorManagementImpl::removeCompare(const string& guid, const Ice::
     }
     else if (mImpl->mLocatorTopic)
     {
-        mImpl->mLocatorTopic->comparisonUnregistered(guid);
+        mImpl->mLocatorTopic->comparisonUnregistered(AsteriskSCF::Operations::createContext(context), guid);
     }
 }
 
@@ -612,7 +618,7 @@ void ServiceLocatorManagementImpl::replicateState(const ServiceLocatorStateItemP
     try
     {
         ServiceLocatorStateReplicatorPrx oneway = ServiceLocatorStateReplicatorPrx::uncheckedCast(mImpl->mStateReplicator->ice_oneway());
-        oneway->setState(items);
+        oneway->setState(AsteriskSCF::Operations:::createContext(), items);
     }
 	catch (const Ice::NoEndpointException&)
     {
@@ -642,7 +648,7 @@ void ServiceLocatorManagementImpl::removeState(const ServiceLocatorStateItemPtr&
     try
     {
         ServiceLocatorStateReplicatorPrx oneway = ServiceLocatorStateReplicatorPrx::uncheckedCast(mImpl->mStateReplicator->ice_oneway());
-        oneway->removeState(items);
+        oneway->removeState(AsteriskSCF::Operations::createContext(), items);
     }
 	catch (const Ice::NoEndpointException&)
     {
diff --git a/src/ServiceLocatorManagement.h b/src/ServiceLocatorManagement.h
index 468565f..a5aa052 100644
--- a/src/ServiceLocatorManagement.h
+++ b/src/ServiceLocatorManagement.h
@@ -87,15 +87,16 @@ public:
     // AsteriskSCF::Core::Discovery::V1::ServiceLocatorManagement interface.
     //
     AsteriskSCF::Core::Discovery::V1::ServiceManagementPrx addService(
+        const AsteriskSCF::System::V1::OperationContextPtr&, 
         const Ice::ObjectPrx&, const std::string&, const Ice::Current&);
     AsteriskSCF::Core::Discovery::V1::ServiceInfoSeq getServices(
         const ::Ice::Current&) const;
     AsteriskSCF::Core::Discovery::V1::ServiceInfo getService(
         const std::string &, const ::Ice::Current&) const;
-    void addCompare(const std::string&,
+    void addCompare(const AsteriskSCF::System::V1::OperationContextPtr&, const std::string&,
         const AsteriskSCF::Core::Discovery::V1::ServiceLocatorParamsComparePrx&,
         const Ice::Current&);
-    void removeCompare(const std::string&, const Ice::Current& = Ice::Current());
+    void removeCompare(const AsteriskSCF::System::V1::OperationContextPtr&, const std::string&, const Ice::Current& = Ice::Current());
 
     void isSupported(const std::string&,
         const AsteriskSCF::Core::Discovery::V1::ServiceLocatorParamsPtr&,
diff --git a/src/ServiceLocatorStateListener.cpp b/src/ServiceLocatorStateListener.cpp
index 81f95d6..af7e5ac 100644
--- a/src/ServiceLocatorStateListener.cpp
+++ b/src/ServiceLocatorStateListener.cpp
@@ -14,17 +14,17 @@
  * at the top of the source tree.
  */
 
-#include <IceUtil/UUID.h>
-
 #include <boost/thread.hpp>
 #include <boost/shared_ptr.hpp>
 
+#include <IceUtil/UUID.h>
+
 #include <AsteriskSCF/System/Component/ReplicaIf.h>
 // #include <AsteriskSCF/Discovery/SmartProxy.h>
 
 #include <AsteriskSCF/Core/Discovery/ServiceLocatorIf.h>
 #include <AsteriskSCF/Core/Discovery/ServiceLocatorEventsIf.h>
-#include <AsteriskSCF/Helpers/OperationContext.h>
+#include <AsteriskSCF/Operations/OperationContext.h>
 
 #include "ServiceLocatorManagement.h"
 #include "ServiceManagement.h"
@@ -47,11 +47,11 @@ public:
     {
 	if (mService)
 	{
-	    mService->unregister();
+	    mService->unregister(AsteriskSCF::Operations::createContext());
 	}
 	if (!mComparator.empty())
 	{
-	    mLocatorManagement->removeCompare(mComparator);
+	    mLocatorManagement->removeCompare(AsteriskSCF::Operations::createContext(), mComparator);
 	}
     }
 
@@ -117,7 +117,8 @@ public:
 		    boost::shared_ptr<ServiceLocatorStateReplicatorItem> newitem(new ServiceLocatorStateReplicatorItem(mLocatorManagement));
                     localitem = newitem;
                     mStateItems.insert(std::make_pair((*item)->key, newitem));
-		    ServiceManagementImplPtr service = mLocatorManagement->addService(serviceState->service, serviceState->guid, serviceState->managementIdentity);
+		    ServiceManagementImplPtr service = mLocatorManagement->addService(
+                        serviceState->service, serviceState->guid, serviceState->managementIdentity);
 		    newitem->setService(service);
 		}
 		else
@@ -128,11 +129,11 @@ public:
 		// The only thing that can be changed by a subsequent state item is the suspend status
 		if (serviceState->suspended == true)
 		{
-		    localitem->getService()->suspend();
+		    localitem->getService()->suspend(AsteriskSCF::Operations::createContext());
 		}
 		else
-		{
-		    localitem->getService()->unsuspend();
+                {
+		    localitem->getService()->unsuspend(AsteriskSCF::Operations::createContext());
 		}
 	    }
 	    else if ((paramsState = ServiceLocatorParamsStateItemPtr::dynamicCast((*item))))
@@ -146,7 +147,7 @@ public:
 		}
 
 		// Parameters are only ever added, they are never modified or removed
-		i->second->getService()->addLocatorParams(AsteriskSCF::createContext(),
+		i->second->getService()->addLocatorParams(AsteriskSCF::Operations::createContext(),
                     paramsState->params, paramsState->compareGuid);
 	    }
 	    else if ((comparatorState = ServiceLocatorComparatorStateItemPtr::dynamicCast((*item))))
@@ -162,7 +163,7 @@ public:
 		try
 		{
 		    Ice::Current current;
-		    mLocatorManagement->addCompare(comparatorState->name, comparatorState->comparator, current);
+		    mLocatorManagement->addCompare(AsteriskSCF::Operations::createContext(), comparatorState->name, comparatorState->comparator, current);
 		    boost::shared_ptr<ServiceLocatorStateReplicatorItem> newitem(new ServiceLocatorStateReplicatorItem(mLocatorManagement));
 		    mStateItems.insert(std::make_pair((*item)->key, newitem));
 		    newitem->setComparator(comparatorState->name);
diff --git a/src/ServiceLocatorStateReplicator.h b/src/ServiceLocatorStateReplicator.h
index 8b64b67..c24dd2e 100644
--- a/src/ServiceLocatorStateReplicator.h
+++ b/src/ServiceLocatorStateReplicator.h
@@ -41,8 +41,8 @@ class ServiceLocatorStateReplicatorListenerI :
 {
 public:
     ServiceLocatorStateReplicatorListenerI(const AsteriskSCF::ServiceDiscovery::ServiceLocatorManagementImplPtr&);
-    void stateRemoved(const Ice::StringSeq&, const Ice::Current&);
-    void stateSet(const AsteriskSCF::Replication::ServiceLocator::V1::ServiceLocatorStateItemSeq&, const Ice::Current&);
+    void stateRemoved(const AsteriskSCF::System::V1::OperationContextPtr&, const Ice::StringSeq&, const Ice::Current&);
+    void stateSet(const AsteriskSCF::System::V1::OperationContextPtr&, const AsteriskSCF::Replication::ServiceLocator::V1::ServiceLocatorStateItemSeq&, const Ice::Current&);
     bool operator==(const ServiceLocatorStateReplicatorListenerI& rhs);
 private:
     boost::shared_ptr<ServiceLocatorStateReplicatorListenerImpl> mImpl;
diff --git a/src/ServiceLocatorStateReplicatorApp.cpp b/src/ServiceLocatorStateReplicatorApp.cpp
index ecc505f..3035efc 100644
--- a/src/ServiceLocatorStateReplicatorApp.cpp
+++ b/src/ServiceLocatorStateReplicatorApp.cpp
@@ -14,6 +14,11 @@
  * at the top of the source tree.
  */
 
+//
+// These are moved up in include order because boost seems to have some kind of name collision on Windows.
+//
+#include <boost/thread.hpp>
+
 #include <Ice/Ice.h>
 #include <IceUtil/UUID.h>
 #include <IceStorm/IceStorm.h>
@@ -65,17 +70,17 @@ public:
     ComponentServiceImpl(ServiceLocatorStateReplicatorService &service) : mService(service) {}
 
 public: // Overrides of the ComponentService interface.
-    virtual void suspend(const ::Ice::Current& = ::Ice::Current())
+    virtual void suspend(const AsteriskSCF::System::V1::OperationContextPtr&, const ::Ice::Current& = ::Ice::Current())
     {
         // TBD
     }
 
-    virtual void resume(const ::Ice::Current& = ::Ice::Current())
+    virtual void resume(const AsteriskSCF::System::V1::OperationContextPtr&, const ::Ice::Current& = ::Ice::Current())
     {
         // TBD
     }
 
-    virtual void shutdown(const ::Ice::Current& = ::Ice::Current())
+    virtual void shutdown(const AsteriskSCF::System::V1::OperationContextPtr&, const ::Ice::Current& = ::Ice::Current())
     {
         // TBD
     }
diff --git a/src/ServiceManagement.cpp b/src/ServiceManagement.cpp
index 34f2e7f..d5d186a 100644
--- a/src/ServiceManagement.cpp
+++ b/src/ServiceManagement.cpp
@@ -14,12 +14,17 @@
  * at the top of the source tree.
  */
 
+//
+// These are moved up in include order because boost seems to have some kind of name collision on Windows.
+//
+#include <boost/thread.hpp>
+#include <boost/thread/shared_mutex.hpp>
+
 #include <Ice/Ice.h>
 #include <IceUtil/UUID.h>
 
-#include <boost/thread.hpp>
-#include <boost/thread/shared_mutex.hpp>
 #include <boost/shared_ptr.hpp>
+#include <AsteriskSCF/Operations/OperationContext.h>
 
 #include <AsteriskSCF/Core/Discovery/ServiceLocatorIf.h>
 #include <AsteriskSCF/Core/Discovery/ServiceLocatorEventsIf.h>
@@ -112,7 +117,7 @@ public:
         mStateItem->managementIdentity = identity;
         if (mLocatorTopic)
         {
-            mLocatorTopic->serviceRegistered(guid);
+            mLocatorTopic->serviceRegistered(AsteriskSCF::Operations::createContext(), guid);
         }
         mManagement->replicateState(mStateItem);
     }
@@ -383,7 +388,7 @@ void ServiceManagementImpl::addLocatorParams(
 /**
  * Implementation of the suspend method as defined in service_locator.ice
  */
-void ServiceManagementImpl::suspend(const Ice::Current&)
+void ServiceManagementImpl::suspend(const AsteriskSCF::System::V1::OperationContextPtr& context, const Ice::Current&)
 {
     boost::unique_lock<boost::shared_mutex> lock(mImpl->mLock);
 
@@ -396,14 +401,14 @@ void ServiceManagementImpl::suspend(const Ice::Current&)
 
     if (mImpl->mLocatorTopic)
     {
-        mImpl->mLocatorTopic->serviceSuspended(mImpl->mStateItem->guid);
+        mImpl->mLocatorTopic->serviceSuspended(AsteriskSCF::Operations::createContext(context), mImpl->mStateItem->guid);
     }
 }
 
 /**
  * Implementation of the unsuspend method as defined in service_locator.ice
  */
-void ServiceManagementImpl::unsuspend(const Ice::Current&)
+void ServiceManagementImpl::unsuspend(const AsteriskSCF::System::V1::OperationContextPtr& context, const Ice::Current&)
 {
     boost::unique_lock<boost::shared_mutex> lock(mImpl->mLock);
 
@@ -416,7 +421,7 @@ void ServiceManagementImpl::unsuspend(const Ice::Current&)
 
     if (mImpl->mLocatorTopic)
     {
-        mImpl->mLocatorTopic->serviceUnsuspended(mImpl->mStateItem->guid);
+        mImpl->mLocatorTopic->serviceUnsuspended(context, mImpl->mStateItem->guid);
     }
 }
 
@@ -449,7 +454,7 @@ ServiceLocatorParamsSeq ServiceManagementImpl::getLocatorParams(const Ice::Curre
 /**
  * Implementation of the unregister method as defined in service_locator.ice
  */
-void ServiceManagementImpl::unregister(const Ice::Current&)
+void ServiceManagementImpl::unregister(const AsteriskSCF::System::V1::OperationContextPtr& context, const Ice::Current&)
 {
     /* You'll notice no lock here. That's because we aren't actually modifying any internal state that should
      * be protected, and if we did lock here there is a chance for a deadlock which is super sad.
@@ -466,7 +471,7 @@ void ServiceManagementImpl::unregister(const Ice::Current&)
 
         if (mImpl->mLocatorTopic)
         {
-            mImpl->mLocatorTopic->serviceUnregistered(mImpl->mStateItem->guid);
+            mImpl->mLocatorTopic->serviceUnregistered(AsteriskSCF::Operations::createContext(context), mImpl->mStateItem->guid);
         }
     }
     catch(const std::exception& e)
diff --git a/src/ServiceManagement.h b/src/ServiceManagement.h
index 0a6c3d6..e8f0907 100644
--- a/src/ServiceManagement.h
+++ b/src/ServiceManagement.h
@@ -41,9 +41,9 @@ public:
     //
     void addLocatorParams(const AsteriskSCF::System::V1::OperationContextPtr&, 
         const AsteriskSCF::Core::Discovery::V1::ServiceLocatorParamsPtr&, const std::string&, const Ice::Current& = Ice::Current());
-    void suspend(const Ice::Current& = Ice::Current());
-    void unsuspend(const Ice::Current& = Ice::Current());
-    void unregister(const Ice::Current& = Ice::Current());
+    void suspend(const AsteriskSCF::System::V1::OperationContextPtr&, const Ice::Current& = Ice::Current());
+    void unsuspend(const AsteriskSCF::System::V1::OperationContextPtr&, const Ice::Current& = Ice::Current());
+    void unregister(const AsteriskSCF::System::V1::OperationContextPtr&, const Ice::Current& = Ice::Current());
     AsteriskSCF::Core::Discovery::V1::ServiceStatus getStatus(const Ice::Current&) const { return getStatus(); }
 
     AsteriskSCF::Core::Discovery::V1::ServiceLocatorParamsSeq getLocatorParams(const Ice::Current&);
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
old mode 100644
new mode 100755
index 36889da..1b08f67
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -7,5 +7,6 @@ astscf_component_add_boost_libraries(service_locator_test unit_test_framework th
 astscf_component_add_slice_collection_libraries(service_locator_test ASTSCF)
 astscf_component_build_icebox(service_locator_test)
 astscf_test_icebox(service_locator_test config/test_component.conf)
+target_link_libraries(service_locator_test LoggingClient ASTSCFIceUtilCpp)
 
 file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/AsteriskSCFIceStorm)
diff --git a/test/TestComparatorBlocking.cpp b/test/TestComparatorBlocking.cpp
index 265355f..234180b 100644
--- a/test/TestComparatorBlocking.cpp
+++ b/test/TestComparatorBlocking.cpp
@@ -34,7 +34,7 @@
 #include <Ice/Ice.h>
 
 #include <AsteriskSCF/Core/Discovery/ServiceLocatorIf.h>
-#include <AsteriskSCF/Helpers/OperationContext.h>
+#include <AsteriskSCF/Operations/OperationContext.h>
 
 using namespace AsteriskSCF::Core::Discovery::V1;
 
@@ -150,7 +150,7 @@ public:
         discovery(ServiceLocatorPrx::checkedCast(
                 discoveryCommunicator->stringToProxy(
                     "LocatorService:tcp -h 127.0.0.1 -p 4411"))),
-        proxy(management->addService(management, "self")),
+        proxy(management->addService(AsteriskSCF::Operations::createContext(), management, "self")),
         params(new ServiceLocatorParams())
     {
         BOOST_REQUIRE(blockerProxy != 0);
@@ -158,17 +158,17 @@ public:
         BOOST_REQUIRE(discovery != 0);
 
         blockerAdapter->activate();
-        management->addCompare("blocker", blockerProxy);
+        management->addCompare(AsteriskSCF::Operations::createContext(), "blocker", blockerProxy);
 
         params->category = "self";
-        proxy->addLocatorParams(AsteriskSCF::createContext(), params, "blocker");
+        proxy->addLocatorParams(AsteriskSCF::Operations::createContext(), params, "blocker");
     }
 
     ~Fixture()
     {
         blocker->unblock();
-        proxy->unregister();
-        management->removeCompare("blocker");
+        proxy->unregister(AsteriskSCF::Operations::createContext());
+        management->removeCompare(AsteriskSCF::Operations::createContext(), "blocker");
         blockerCommunicator->shutdown();
         blockerCommunicator->waitForShutdown();
 
diff --git a/test/TestServiceLocator.cpp b/test/TestServiceLocator.cpp
index fc14e48..a2e7b64 100644
--- a/test/TestServiceLocator.cpp
+++ b/test/TestServiceLocator.cpp
@@ -26,7 +26,7 @@
 #include <AsteriskSCF/Core/Discovery/ServiceLocatorIf.h>
 #include <AsteriskSCF/Core/Discovery/ServiceLocatorEventsIf.h>
 
-#include <AsteriskSCF/Helpers/OperationContext.h>
+#include <AsteriskSCF/Operations/OperationContext.h>
 
 using namespace std;
 using namespace AsteriskSCF::Core::Discovery::V1;
@@ -307,7 +307,8 @@ BOOST_AUTO_TEST_CASE(AddService)
      */
     try
     {
-        testbed.compareManagement = testbed.management->addService(testbed.compare, "testcompare");
+        testbed.compareManagement = testbed.management->addService(AsteriskSCF::Operations::createContext(), 
+            testbed.compare, "testcompare");
         added = true;
     }
     catch (const Ice::Exception &e)
@@ -355,7 +356,7 @@ BOOST_AUTO_TEST_CASE(AddLocatorParamsWithoutCompareService)
         params->category = "test";
         params->service = "default";
 
-        testbed.compareManagement->addLocatorParams(AsteriskSCF::createContext(), params, "");
+        testbed.compareManagement->addLocatorParams(AsteriskSCF::Operations::createContext(), params, "");
 
         added = true;
     }
@@ -429,7 +430,7 @@ BOOST_AUTO_TEST_CASE(AddCompare)
 
     try
     {
-        testbed.management->addCompare("testcompare", testbed.compare);
+        testbed.management->addCompare(AsteriskSCF::Operations::createContext(), "testcompare", testbed.compare);
 
         added = true;
     }
@@ -457,7 +458,7 @@ BOOST_AUTO_TEST_CASE(AddDuplicateCompare)
 
     try
     {
-        testbed.management->addCompare("testcompare", testbed.compare);
+        testbed.management->addCompare(AsteriskSCF::Operations::createContext(), "testcompare", testbed.compare);
 
         added = true;
     }
@@ -489,7 +490,7 @@ BOOST_AUTO_TEST_CASE(AddLocatorParamsWithCompareService)
         params->category = "test2";
         params->service = "default";
 
-        testbed.compareManagement->addLocatorParams(AsteriskSCF::createContext(), params, "testcompare");
+        testbed.compareManagement->addLocatorParams(AsteriskSCF::Operations::createContext(), params, "testcompare");
 
         added = true;
     }
@@ -550,16 +551,17 @@ BOOST_AUTO_TEST_CASE(UseServiceFoundWithCompareService)
 BOOST_AUTO_TEST_CASE(FindMultipleServices)
 {
     ServiceLocatorParamsPtr params = new ServiceLocatorParams;
-    ServiceManagementPrx compareManagement = testbed.management->addService(testbed.compare, "testcompare2");
+    ServiceManagementPrx compareManagement = testbed.management->addService(AsteriskSCF::Operations::createContext(), 
+        testbed.compare, "testcompare2");
 
     params->category = "test";
     params->service = "default";
 
-    compareManagement->addLocatorParams(AsteriskSCF::createContext(), params, "");
+    compareManagement->addLocatorParams(AsteriskSCF::Operations::createContext(), params, "");
 
     bool found = testbed.findServices("test", "", 2);
 
-    compareManagement->unregister();
+    compareManagement->unregister(AsteriskSCF::Operations::createContext());
 
     BOOST_CHECK(found);
 }
@@ -570,16 +572,17 @@ BOOST_AUTO_TEST_CASE(FindMultipleServices)
 BOOST_AUTO_TEST_CASE(FindMultipleServicesUsingEmptyCategory)
 {
     ServiceLocatorParamsPtr params = new ServiceLocatorParams;
-    ServiceManagementPrx compareManagement = testbed.management->addService(testbed.compare, "testcompare2");
+    ServiceManagementPrx compareManagement = testbed.management->addService(AsteriskSCF::Operations::createContext(), 
+        testbed.compare, "testcompare2");
 
     params->category = "test";
 
-    compareManagement->addLocatorParams(AsteriskSCF::createContext(), params, "");
+    compareManagement->addLocatorParams(AsteriskSCF::Operations::createContext(), params, "");
 
     // This takes into account that the service locator internally publishes an IceStorm topic manager service
     bool found = testbed.findServices("", "", 3);
 
-    compareManagement->unregister();
+    compareManagement->unregister(AsteriskSCF::Operations::createContext());
 
     BOOST_CHECK(found);
 }
@@ -593,7 +596,7 @@ BOOST_AUTO_TEST_CASE(ServiceSuspend)
 
     try
     {
-        testbed.compareManagement->suspend();
+        testbed.compareManagement->suspend(AsteriskSCF::Operations::createContext());
         suspended = true;
     }
     catch (const Ice::Exception &e)
@@ -627,7 +630,7 @@ BOOST_AUTO_TEST_CASE(ServiceUnsuspend)
 
     try
     {
-        testbed.compareManagement->unsuspend();
+        testbed.compareManagement->unsuspend(AsteriskSCF::Operations::createContext());
         unsuspended = true;
     }
     catch (const Ice::Exception &e)
@@ -661,7 +664,7 @@ BOOST_AUTO_TEST_CASE(RemoveNonexistentCompareService)
 
     try
     {
-        testbed.management->removeCompare("testcompare2");
+        testbed.management->removeCompare(AsteriskSCF::Operations::createContext(), "testcompare2");
         removed = true;
     }
     catch (const CompareNotFound&)
@@ -688,7 +691,7 @@ BOOST_AUTO_TEST_CASE(RemoveCompareService)
 
     try
     {
-        testbed.management->removeCompare("testcompare");
+        testbed.management->removeCompare(AsteriskSCF::Operations::createContext(), "testcompare");
         removed = true;
     }
     catch (const CompareNotFound&)
@@ -715,7 +718,7 @@ BOOST_AUTO_TEST_CASE(RemoveAlreadyRemovedCompareService)
 
     try
     {
-        testbed.management->removeCompare("testcompare");
+        testbed.management->removeCompare(AsteriskSCF::Operations::createContext(), "testcompare");
         removed = true;
     }
     catch (const CompareNotFound&)
@@ -752,7 +755,7 @@ BOOST_AUTO_TEST_CASE(ServiceUnregister)
 
     try
     {
-        testbed.compareManagement->unregister();
+        testbed.compareManagement->unregister(AsteriskSCF::Operations::createContext());
         unregistered = true;
     }
     catch (const Ice::Exception &e)

commit 46662a7b26b07f8090151101f1d3137bd147e340
Author: Brent Eagles <beagles at digium.com>
Date:   Thu Feb 2 16:45:57 2012 -0330

    build fixes for operation context (TODO, spread cache throughout)

diff --git a/src/ServiceLocator.cpp b/src/ServiceLocator.cpp
index 1851327..6edfc3e 100644
--- a/src/ServiceLocator.cpp
+++ b/src/ServiceLocator.cpp
@@ -25,6 +25,7 @@
 #include <AsteriskSCF/Logger/IceLogger.h>
 #include <AsteriskSCF/System/Component/ReplicaIf.h>
 #include <AsteriskSCF/CollocatedIceStorm/CollocatedIceStorm.h>
+#include <AsteriskSCF/Helpers/OperationContext.h>
 
 #include "ServiceLocatorManagement.h"
 #include "ServiceManagement.h"
@@ -297,7 +298,7 @@ void ServiceLocatorApp::start(const string& appName, const Ice::CommunicatorPtr&
 	ServiceLocatorParamsPtr params = new ServiceLocatorParams;
 	params->category = TopicManagerCategory;
 	params->service = "default";
-	icestormManagement->addLocatorParams(params, "");
+	icestormManagement->addLocatorParams(AsteriskSCF::createContext(), params, "");
     }
 
     mDiscoveryAdapter->activate();
diff --git a/src/ServiceLocatorStateListener.cpp b/src/ServiceLocatorStateListener.cpp
index a549e3b..81f95d6 100644
--- a/src/ServiceLocatorStateListener.cpp
+++ b/src/ServiceLocatorStateListener.cpp
@@ -24,6 +24,7 @@
 
 #include <AsteriskSCF/Core/Discovery/ServiceLocatorIf.h>
 #include <AsteriskSCF/Core/Discovery/ServiceLocatorEventsIf.h>
+#include <AsteriskSCF/Helpers/OperationContext.h>
 
 #include "ServiceLocatorManagement.h"
 #include "ServiceManagement.h"
@@ -145,7 +146,8 @@ public:
 		}
 
 		// Parameters are only ever added, they are never modified or removed
-		i->second->getService()->addLocatorParams(paramsState->params, paramsState->compareGuid);
+		i->second->getService()->addLocatorParams(AsteriskSCF::createContext(),
+                    paramsState->params, paramsState->compareGuid);
 	    }
 	    else if ((comparatorState = ServiceLocatorComparatorStateItemPtr::dynamicCast((*item))))
 	    {
diff --git a/src/ServiceManagement.cpp b/src/ServiceManagement.cpp
index fac2e48..34f2e7f 100644
--- a/src/ServiceManagement.cpp
+++ b/src/ServiceManagement.cpp
@@ -369,7 +369,9 @@ bool ServiceLocatorParamsSpec::isSupported(const ServiceLocatorParamsPtr& params
 /**
  * Implementation of the addLocatorParams method as defined in service_locator.ice
  */
-void ServiceManagementImpl::addLocatorParams(const ServiceLocatorParamsPtr& params, const std::string& compareGuid, const Ice::Current&)
+void ServiceManagementImpl::addLocatorParams(
+    const AsteriskSCF::System::V1::OperationContextPtr&,
+    const ServiceLocatorParamsPtr& params, const std::string& compareGuid, const Ice::Current&)
 {
     boost::unique_lock<boost::shared_mutex> lock(mImpl->mLock);
 
diff --git a/src/ServiceManagement.h b/src/ServiceManagement.h
index a1966d7..0a6c3d6 100644
--- a/src/ServiceManagement.h
+++ b/src/ServiceManagement.h
@@ -39,7 +39,8 @@ public:
     //
     // AsteriskSCF::Core::Discovery::V1::ServiceManagement interface.
     //
-    void addLocatorParams(const AsteriskSCF::Core::Discovery::V1::ServiceLocatorParamsPtr&, const std::string&, const Ice::Current& = Ice::Current());
+    void addLocatorParams(const AsteriskSCF::System::V1::OperationContextPtr&, 
+        const AsteriskSCF::Core::Discovery::V1::ServiceLocatorParamsPtr&, const std::string&, const Ice::Current& = Ice::Current());
     void suspend(const Ice::Current& = Ice::Current());
     void unsuspend(const Ice::Current& = Ice::Current());
     void unregister(const Ice::Current& = Ice::Current());
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index bbfa333..36889da 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -1,3 +1,4 @@
+include_directories(${astscf-ice-util-cpp_dir}/include)
 astscf_component_init(service_locator_test)
 astscf_component_add_files(service_locator_test TestServiceLocator.cpp)
 astscf_component_add_files(service_locator_test TestComparatorBlocking.cpp)
diff --git a/test/TestComparatorBlocking.cpp b/test/TestComparatorBlocking.cpp
index 7272313..265355f 100644
--- a/test/TestComparatorBlocking.cpp
+++ b/test/TestComparatorBlocking.cpp
@@ -34,6 +34,7 @@
 #include <Ice/Ice.h>
 
 #include <AsteriskSCF/Core/Discovery/ServiceLocatorIf.h>
+#include <AsteriskSCF/Helpers/OperationContext.h>
 
 using namespace AsteriskSCF::Core::Discovery::V1;
 
@@ -160,7 +161,7 @@ public:
         management->addCompare("blocker", blockerProxy);
 
         params->category = "self";
-        proxy->addLocatorParams(params, "blocker");
+        proxy->addLocatorParams(AsteriskSCF::createContext(), params, "blocker");
     }
 
     ~Fixture()
diff --git a/test/TestServiceLocator.cpp b/test/TestServiceLocator.cpp
index c39619d..fc14e48 100644
--- a/test/TestServiceLocator.cpp
+++ b/test/TestServiceLocator.cpp
@@ -26,6 +26,8 @@
 #include <AsteriskSCF/Core/Discovery/ServiceLocatorIf.h>
 #include <AsteriskSCF/Core/Discovery/ServiceLocatorEventsIf.h>
 
+#include <AsteriskSCF/Helpers/OperationContext.h>
+
 using namespace std;
 using namespace AsteriskSCF::Core::Discovery::V1;
 
@@ -353,7 +355,7 @@ BOOST_AUTO_TEST_CASE(AddLocatorParamsWithoutCompareService)
         params->category = "test";
         params->service = "default";
 
-        testbed.compareManagement->addLocatorParams(params, "");
+        testbed.compareManagement->addLocatorParams(AsteriskSCF::createContext(), params, "");
 
         added = true;
     }
@@ -487,7 +489,7 @@ BOOST_AUTO_TEST_CASE(AddLocatorParamsWithCompareService)
         params->category = "test2";
         params->service = "default";
 
-        testbed.compareManagement->addLocatorParams(params, "testcompare");
+        testbed.compareManagement->addLocatorParams(AsteriskSCF::createContext(), params, "testcompare");
 
         added = true;
     }
@@ -553,7 +555,7 @@ BOOST_AUTO_TEST_CASE(FindMultipleServices)
     params->category = "test";
     params->service = "default";
 
-    compareManagement->addLocatorParams(params, "");
+    compareManagement->addLocatorParams(AsteriskSCF::createContext(), params, "");
 
     bool found = testbed.findServices("test", "", 2);
 
@@ -572,7 +574,7 @@ BOOST_AUTO_TEST_CASE(FindMultipleServicesUsingEmptyCategory)
 
     params->category = "test";
 
-    compareManagement->addLocatorParams(params, "");
+    compareManagement->addLocatorParams(AsteriskSCF::createContext(), params, "");
 
     // This takes into account that the service locator internally publishes an IceStorm topic manager service
     bool found = testbed.findServices("", "", 3);

commit 781b2b7edd18b0f8e0c88e6fe5f53d1ff840210e
Author: Brent Eagles <beagles at digium.com>
Date:   Tue Jan 24 14:18:27 2012 -0330

    Add an accessor to ServiceManagement object to query the registered
    locator param objects.

diff --git a/src/ServiceManagement.cpp b/src/ServiceManagement.cpp
index 9db70e6..fac2e48 100644
--- a/src/ServiceManagement.cpp
+++ b/src/ServiceManagement.cpp
@@ -75,6 +75,11 @@ public:
 
     bool isSupported(const AsteriskSCF::Core::Discovery::V1::ServiceLocatorParamsPtr&, const IsSupportedCallbackPtr&);
 
+    ServiceLocatorParamsPtr getParams()
+    {
+        return mStateItem->params;
+    }
+
 private:
     /**
      * Parameters state replication item.
@@ -426,6 +431,19 @@ ServiceStatus ServiceManagementImpl::getStatus() const
     }
 }
 
+ServiceLocatorParamsSeq ServiceManagementImpl::getLocatorParams(const Ice::Current&)
+{
+    
+    boost::shared_lock<boost::shared_mutex> lock(mImpl->mLock);
+    ServiceLocatorParamsSeq result;
+    for (std::vector<boost::shared_ptr<ServiceLocatorParamsSpec> >::const_iterator iter = mImpl->mSupportedLocatorParams.begin();
+         iter != mImpl->mSupportedLocatorParams.end(); ++iter)
+    {
+        result.push_back(ServiceLocatorParamsPtr::dynamicCast((*iter)->getParams()->ice_clone()));
+    }
+    return result;
+}
+
 /**
  * Implementation of the unregister method as defined in service_locator.ice
  */
diff --git a/src/ServiceManagement.h b/src/ServiceManagement.h
index 66fd43f..a1966d7 100644
--- a/src/ServiceManagement.h
+++ b/src/ServiceManagement.h
@@ -45,6 +45,8 @@ public:
     void unregister(const Ice::Current& = Ice::Current());
     AsteriskSCF::Core::Discovery::V1::ServiceStatus getStatus(const Ice::Current&) const { return getStatus(); }
 
+    AsteriskSCF::Core::Discovery::V1::ServiceLocatorParamsSeq getLocatorParams(const Ice::Current&);
+
     Ice::ObjectPrx getService();
     AsteriskSCF::Core::Discovery::V1::ServiceManagementPrx getServiceManagementPrx();
     void isSupported(

commit 1b5d9634d1e151d22da4e647d1faff4c39d85f61
Author: Mark Michelson <mmichelson at digium.com>
Date:   Tue Jan 3 14:37:39 2012 -0600

    Adjust component library names and update test config files

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 78174e6..6a91640 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,20 +1,20 @@
 include_directories(${astscf-ice-util-cpp_dir}/include)
 include_directories(${logger_dir}/include)
 
-astscf_component_init(service_locator)
-astscf_component_add_slices(service_locator PROJECT AsteriskSCF/Replication/ServiceLocator/ServiceLocatorStateReplicationIf.ice)
-astscf_component_add_files(service_locator ServiceLocator.cpp)
-astscf_component_add_files(service_locator ServiceLocatorManagement.cpp)
-astscf_component_add_files(service_locator ServiceManagement.cpp)
-astscf_component_add_files(service_locator ServiceManagement.h)
-astscf_component_add_files(service_locator ServiceLocatorManagement.h)
-astscf_component_add_files(service_locator ServiceLocatorStateReplicator.h)
-astscf_component_add_files(service_locator ServiceLocatorStateListener.cpp)
-astscf_component_add_ice_libraries(service_locator IceStorm)
-astscf_component_add_boost_libraries(service_locator core thread date_time)
-astscf_component_build_icebox(service_locator)
-target_link_libraries(service_locator LoggingClient ASTSCFIceUtilCpp)
-astscf_component_install(service_locator)
+astscf_component_init(ServiceLocator)
+astscf_component_add_slices(ServiceLocator PROJECT AsteriskSCF/Replication/ServiceLocator/ServiceLocatorStateReplicationIf.ice)
+astscf_component_add_files(ServiceLocator ServiceLocator.cpp)
+astscf_component_add_files(ServiceLocator ServiceLocatorManagement.cpp)
+astscf_component_add_files(ServiceLocator ServiceManagement.cpp)
+astscf_component_add_files(ServiceLocator ServiceManagement.h)
+astscf_component_add_files(ServiceLocator ServiceLocatorManagement.h)
+astscf_component_add_files(ServiceLocator ServiceLocatorStateReplicator.h)
+astscf_component_add_files(ServiceLocator ServiceLocatorStateListener.cpp)
+astscf_component_add_ice_libraries(ServiceLocator IceStorm)
+astscf_component_add_boost_libraries(ServiceLocator core thread date_time)
+astscf_component_build_icebox(ServiceLocator)
+target_link_libraries(ServiceLocator LoggingClient ASTSCFIceUtilCpp)
+astscf_component_install(ServiceLocator)
 
 astscf_component_init(ServiceLocatorStateReplicator)
 astscf_component_add_slices(ServiceLocatorStateReplicator PROJECT AsteriskSCF/Replication/ServiceLocator/ServiceLocatorStateReplicationIf.ice)

commit aaff657ebc33e245d2721e2bb27ad3f44f7c7ef9
Merge: f5f07fb e2ae2ad
Author: Mark Michelson <mmichelson at digium.com>
Date:   Fri Dec 30 14:53:50 2011 -0600

    Merge branch 'master' of git.asterisk.org:asterisk-scf/release/servicediscovery


commit f5f07fb426c35417c6f73c7c9b7e4b2ce3d1dc80
Author: Mark Michelson <mmichelson at digium.com>
Date:   Wed Dec 28 12:17:20 2011 -0600

    Adjust for name changes in ice-util-cpp

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 4f106e5..78174e6 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -13,7 +13,7 @@ astscf_component_add_files(service_locator ServiceLocatorStateListener.cpp)
 astscf_component_add_ice_libraries(service_locator IceStorm)
 astscf_component_add_boost_libraries(service_locator core thread date_time)
 astscf_component_build_icebox(service_locator)
-target_link_libraries(service_locator LoggingClient astscf-ice-util-cpp)
+target_link_libraries(service_locator LoggingClient ASTSCFIceUtilCpp)
 astscf_component_install(service_locator)
 
 astscf_component_init(ServiceLocatorStateReplicator)

commit 60c7d5708bf016e64b96583af3df8118dc054c5d
Author: Mark Michelson <mmichelson at digium.com>
Date:   Tue Dec 27 16:46:33 2011 -0600

    Adjust for logger name changes.

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index cfd57d9..4f106e5 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -13,7 +13,7 @@ astscf_component_add_files(service_locator ServiceLocatorStateListener.cpp)
 astscf_component_add_ice_libraries(service_locator IceStorm)
 astscf_component_add_boost_libraries(service_locator core thread date_time)
 astscf_component_build_icebox(service_locator)
-target_link_libraries(service_locator logging-client astscf-ice-util-cpp)
+target_link_libraries(service_locator LoggingClient astscf-ice-util-cpp)
 astscf_component_install(service_locator)
 
 astscf_component_init(ServiceLocatorStateReplicator)
@@ -23,5 +23,5 @@ astscf_component_add_files(ServiceLocatorStateReplicator ServiceLocatorStateRepl
 astscf_component_add_ice_libraries(ServiceLocatorStateReplicator IceStorm)
 astscf_component_add_boost_libraries(ServiceLocatorStateReplicator thread date_time)
 astscf_component_build_icebox(ServiceLocatorStateReplicator)
-target_link_libraries(ServiceLocatorStateReplicator logging-client)
+target_link_libraries(ServiceLocatorStateReplicator LoggingClient)
 astscf_component_install(ServiceLocatorStateReplicator)
diff --git a/src/ServiceLocator.cpp b/src/ServiceLocator.cpp
index b7ec895..94208ea 100644
--- a/src/ServiceLocator.cpp
+++ b/src/ServiceLocator.cpp
@@ -21,7 +21,7 @@
 #include <AsteriskSCF/Helpers/PropertyHelper.h>
 #include <AsteriskSCF/Core/Discovery/ServiceLocatorIf.h>
 #include <AsteriskSCF/Core/Discovery/ServiceLocatorEventsIf.h>
-#include <AsteriskSCF/logger.h>
+#include <AsteriskSCF/Logger.h>
 #include <AsteriskSCF/Logger/IceLogger.h>
 #include <AsteriskSCF/System/Component/ReplicaIf.h>
 #include <AsteriskSCF/CollocatedIceStorm/CollocatedIceStorm.h>
diff --git a/src/ServiceLocatorManagement.cpp b/src/ServiceLocatorManagement.cpp
index 0cfd407..48e17fe 100644
--- a/src/ServiceLocatorManagement.cpp
+++ b/src/ServiceLocatorManagement.cpp
@@ -22,7 +22,7 @@
 
 #include <AsteriskSCF/Core/Discovery/ServiceLocatorIf.h>
 #include <AsteriskSCF/Core/Discovery/ServiceLocatorEventsIf.h>
-#include <AsteriskSCF/logger.h>
+#include <AsteriskSCF/Logger.h>
 #include <AsteriskSCF/Async/ResponseCollector.h>
 
 #include "ServiceLocatorStateReplicationIf.h"
diff --git a/src/ServiceLocatorStateReplicatorApp.cpp b/src/ServiceLocatorStateReplicatorApp.cpp
index 23378f7..ecc505f 100644
--- a/src/ServiceLocatorStateReplicatorApp.cpp
+++ b/src/ServiceLocatorStateReplicatorApp.cpp
@@ -21,7 +21,7 @@
 
 #include <AsteriskSCF/Core/Discovery/ServiceLocatorIf.h>
 #include <AsteriskSCF/System/Component/ComponentServiceIf.h>
-#include <AsteriskSCF/logger.h>
+#include <AsteriskSCF/Logger.h>
 #include <AsteriskSCF/Logger/IceLogger.h>
 #include "ServiceLocatorStateReplicator.h"
 
diff --git a/src/ServiceManagement.cpp b/src/ServiceManagement.cpp
index 2beec01..c329520 100644
--- a/src/ServiceManagement.cpp
+++ b/src/ServiceManagement.cpp
@@ -23,7 +23,7 @@
 
 #include <AsteriskSCF/Core/Discovery/ServiceLocatorIf.h>
 #include <AsteriskSCF/Core/Discovery/ServiceLocatorEventsIf.h>
-#include <AsteriskSCF/logger.h>
+#include <AsteriskSCF/Logger.h>
 #include <AsteriskSCF/Async/ResponseCollector.h>
 
 #include "ServiceLocatorStateReplicationIf.h"

commit e2ae2ad8314bf9fbc10c8b27f6fdc9e068ee6c78
Author: Brent Eagles <beagles at digium.com>
Date:   Tue Dec 6 17:29:03 2011 -0330

    Modify all unit tests to use loopback adapter.

diff --git a/config/test_component.conf b/config/test_component.conf
index 18866fe..24a5805 100644
--- a/config/test_component.conf
+++ b/config/test_component.conf
@@ -23,25 +23,25 @@ IceBox.LoadOrder=ServiceDiscoveryStateReplicator,ServiceDiscovery,ServiceDiscove
 IceBox.Service.ServiceDiscovery=service_locator:create
 
 # Test endpoints for the service locator local adapter
-ServiceDiscovery.BackplaneAdapter.Endpoints=tcp -p 4410
+ServiceDiscovery.BackplaneAdapter.Endpoints=tcp -h 127.0.0.1 -p 4410
 
 # Test endpoints for the service locator discovery adapter
-ServiceDiscovery.Locator.ServiceAdapter.Endpoints=tcp -p 4411
+ServiceDiscovery.Locator.ServiceAdapter.Endpoints=tcp -h 127.0.0.1  -p 4411
 
 # Test endpoints for the service locator management adapter
-ServiceDiscovery.Management.ServiceAdapter.Endpoints=tcp -p 4412
+ServiceDiscovery.Management.ServiceAdapter.Endpoints=tcp -h 127.0.0.1  -p 4412
 
 # Name for the IceStorm instance
 ServiceDiscovery.IceStorm.InstanceName=ServiceDiscovery
 
 # Proxy to the state replicator
-ServiceDiscovery.StateReplicator.Proxy=ServiceLocatorStateReplicatorService:tcp -p 4413
+ServiceDiscovery.StateReplicator.Proxy=ServiceLocatorStateReplicatorService:tcp -h 127.0.0.1  -p 4413
 
 # Configure ourselves as a master
 ServiceDiscovery.Standalone=no
 
-ServiceDiscovery.IceStorm.TopicManager.Endpoints=default -p 4421
-ServiceDiscovery.IceStorm.Publish.Endpoints=tcp -p 4422:udp -p 4422
+ServiceDiscovery.IceStorm.TopicManager.Endpoints=default -h 127.0.0.1  -p 4421
+ServiceDiscovery.IceStorm.Publish.Endpoints=tcp -h 127.0.0.1  -p 4422:udp -h 127.0.0.1  -p 4422
 ServiceDiscovery.IceStorm.Trace.TopicManager=2
 ServiceDiscovery.IceStorm.Transient=1
 ServiceDiscovery.IceStorm.Flush.Timeout=2000
@@ -52,11 +52,10 @@ ServiceDiscovery.IceStorm.Flush.Timeout=2000
 IceBox.Service.ServiceDiscoveryStateReplicator=ServiceLocatorStateReplicator:create
 
 # Test endpoints for the state replicator
-ServiceDiscoveryStateReplicator.Adapter.Endpoints=tcp -p 4413:udp -p 4413
+ServiceDiscoveryStateReplicator.Adapter.Endpoints=tcp -h 127.0.0.1  -p 4413:udp -h 127.0.0.1  -p 4413
 
 # test configuration
 IceBox.Service.ServiceDiscoveryTest=service_locator_test:create
 
-LocatorService.Proxy=LocatorService:tcp -p 4411
-LocatorServiceManagement.Proxy=LocatorServiceManagement:tcp -p 4412
-
+LocatorService.Proxy=LocatorService:tcp -h 127.0.0.1  -p 4411
+LocatorServiceManagement.Proxy=LocatorServiceManagement:tcp -h 127.0.0.1  -p 4412
diff --git a/test/TestComparatorBlocking.cpp b/test/TestComparatorBlocking.cpp
index 8827fc2..7272313 100644
--- a/test/TestComparatorBlocking.cpp
+++ b/test/TestComparatorBlocking.cpp
@@ -137,7 +137,7 @@ public:
         blocker(new BlockingComparator()),
         blockerAdapter(
             blockerCommunicator->createObjectAdapterWithEndpoints(
-                "blocker", "default")),
+                "blocker", "default -h 127.0.0.1")),
         blockerProxy(
             ServiceLocatorParamsComparePrx::checkedCast(
                 blockerAdapter->addWithUUID(blocker))),
@@ -145,10 +145,10 @@ public:
         discoveryCommunicator(Ice::initialize()),
         management(ServiceLocatorManagementPrx::checkedCast(
                 discoveryCommunicator->stringToProxy(
-                    "LocatorServiceManagement:tcp -p 4412"))),
+                    "LocatorServiceManagement:tcp -h 127.0.0.1 -p 4412"))),
         discovery(ServiceLocatorPrx::checkedCast(
                 discoveryCommunicator->stringToProxy(
-                    "LocatorService:tcp -p 4411"))),
+                    "LocatorService:tcp -h 127.0.0.1 -p 4411"))),
         proxy(management->addService(management, "self")),
         params(new ServiceLocatorParams())
     {
diff --git a/test/TestServiceLocator.cpp b/test/TestServiceLocator.cpp
index 595b1a2..c39619d 100644
--- a/test/TestServiceLocator.cpp
+++ b/test/TestServiceLocator.cpp
@@ -176,7 +176,7 @@ struct GlobalIceFixture
         {
             testbed.communicatorIncoming = Ice::initialize(mCachedArgs.argc, mCachedArgs.argv);
 
-            testbed.adapter = testbed.communicatorIncoming->createObjectAdapterWithEndpoints("CompareServiceAdapter", "default");
+            testbed.adapter = testbed.communicatorIncoming->createObjectAdapterWithEndpoints("CompareServiceAdapter", "default -h 127.0.0.1");
 
             ServiceLocatorParamsComparePtr CompareService = new TestCompareServiceImpl();
 
@@ -188,14 +188,14 @@ struct GlobalIceFixture
 
             // TODO: This should use a configuration file most likely instead of hardcoding
 
-            testbed.management = ServiceLocatorManagementPrx::checkedCast(testbed.communicatorOutgoing->stringToProxy("LocatorServiceManagement:tcp -p 4412"));
+            testbed.management = ServiceLocatorManagementPrx::checkedCast(testbed.communicatorOutgoing->stringToProxy("LocatorServiceManagement:tcp -h 127.0.0.1 -p 4412"));
 
             if (!testbed.management)
             {
                 throw "Invalid service discovery management proxy";
             }
 
-            testbed.discovery = ServiceLocatorPrx::checkedCast(testbed.communicatorOutgoing->stringToProxy("LocatorService:tcp -p 4411"));
+            testbed.discovery = ServiceLocatorPrx::checkedCast(testbed.communicatorOutgoing->stringToProxy("LocatorService:tcp -h 127.0.0.1 -p 4411"));
 
             if (!testbed.discovery)
             {

commit 9f904f9821b2ba067f532272bd3140c75abd22cf
Author: Joshua Colp <jcolp at digium.com>
Date:   Sun Dec 4 19:48:05 2011 -0400

    Add support for getting the Service Locator Management interface using a facet and for locating the IceStorm topic manager using the service locator itself. (issue ASTSCF-317)

diff --git a/src/ServiceLocator.cpp b/src/ServiceLocator.cpp
index 2522101..55091d2 100644
--- a/src/ServiceLocator.cpp
+++ b/src/ServiceLocator.cpp
@@ -267,9 +267,9 @@ void ServiceLocatorApp::start(const string& appName, const Ice::CommunicatorPtr&
             lg(Info) << "Operating in an active state and pushing updates." << endl;
         }
     }
-	catch (const std::exception& e)
+    catch (const std::exception& e)
     {
-		lg(Warning) << "Operating in an active and standalone state since we got an exception: " << e.what() << endl;
+        lg(Warning) << "Operating in an active and standalone state since we got an exception: " << e.what() << endl;
     }
     catch (...)
     {
@@ -287,6 +287,19 @@ void ServiceLocatorApp::start(const string& appName, const Ice::CommunicatorPtr&
 
     mDiscoveryAdapter->add(locatorService, communicator->stringToIdentity("LocatorService"));
 
+    mDiscoveryAdapter->addFacet(locatorServiceManagement, communicator->stringToIdentity("LocatorService"), ServiceLocatorManagementFacet);
+
+    // Make our IceStorm topic manager available to all if we are the active service. This is because by adding it
+    // we will replicate it.
+    if (mReplicaService->isActive() == true)
+    {
+	ServiceManagementPrx icestormManagement = locatorServiceManagement->addService(topicManager, "TopicManager", Ice::Current());
+	ServiceLocatorParamsPtr params = new ServiceLocatorParams;
+	params->category = TopicManagerCategory;
+	params->service = "default";
+	icestormManagement->addLocatorParams(params, "");
+    }
+
     mDiscoveryAdapter->activate();
 
     lg(Info) << "Activated service discovery.";
diff --git a/test/TestServiceLocator.cpp b/test/TestServiceLocator.cpp
index ccf4122..595b1a2 100644
--- a/test/TestServiceLocator.cpp
+++ b/test/TestServiceLocator.cpp
@@ -239,6 +239,40 @@ using namespace InternalTestNS;
 BOOST_GLOBAL_FIXTURE(GlobalIceFixture);
 
 /**
+ * Confirm that we find the built-in IceStorm topic manager.
+ */
+BOOST_AUTO_TEST_CASE(FindBuiltinIceStorm)
+{
+    bool found = testbed.findService(TopicManagerCategory, "default");
+
+    BOOST_CHECK(found);
+}
+
+/**
+ * Confirm that the management interface is available.
+ */
+BOOST_AUTO_TEST_CASE(GetManagementFacet)
+{
+    bool retrieved = false;
+
+    try
+    {
+        ServiceLocatorManagementPrx management = ServiceLocatorManagementPrx::checkedCast(testbed.discovery, ServiceLocatorManagementFacet);
+        retrieved = true;
+    }
+    catch (const Ice::Exception &e)
+    {
+        BOOST_TEST_MESSAGE(e.ice_name());
+        BOOST_TEST_MESSAGE(e.what());
+    }
+    catch (...)
+    {
+    }
+
+    BOOST_CHECK(retrieved);
+}
+
+/**
  * Confirm that we find no service using locate before we have added one.
  */
 BOOST_AUTO_TEST_CASE(ServiceNotFoundBeforeAdd)
@@ -540,7 +574,8 @@ BOOST_AUTO_TEST_CASE(FindMultipleServicesUsingEmptyCategory)
 
     compareManagement->addLocatorParams(params, "");
 
-    bool found = testbed.findServices("", "", 2);
+    // This takes into account that the service locator internally publishes an IceStorm topic manager service
+    bool found = testbed.findServices("", "", 3);
 
     compareManagement->unregister();
 

commit 722e080131e9a32952103bd55bf3243ba3b61fd0
Author: Joshua Colp <jcolp at digium.com>
Date:   Fri Nov 11 14:52:10 2011 -0400

    Tweak log levels/messages. (issue ASTSCF-383)

diff --git a/src/ServiceLocator.cpp b/src/ServiceLocator.cpp
index b7ec895..2522101 100644
--- a/src/ServiceLocator.cpp
+++ b/src/ServiceLocator.cpp
@@ -215,7 +215,7 @@ void ServiceLocatorApp::start(const string& appName, const Ice::CommunicatorPtr&
             }
             catch (const IceStorm::TopicExists&)
             {
-                lg(Error) << "Oh snap! Race condition creating topic, aborting";
+                lg(Critical) << "Oh snap! Race condition creating topic, aborting";
                 return;
             }
             lg(Info) << "Created service discovery event topic";
@@ -269,12 +269,12 @@ void ServiceLocatorApp::start(const string& appName, const Ice::CommunicatorPtr&
     }
 	catch (const std::exception& e)
     {
-		lg(Info) << "Operating in an active and standalone state since we got an exception: " << e.what() << endl;
+		lg(Warning) << "Operating in an active and standalone state since we got an exception: " << e.what() << endl;
     }
     catch (...)
     {
 	// If we reach this point then no state replicator is present and we are acting in a stand-alone fashion
-	lg(Info) << "Operating in an active and standalone state." << endl;
+	lg(Warning) << "Operating in an active and standalone state." << endl;
     }
 
     lg(Info) << "Activated service discovery management.";
diff --git a/src/ServiceLocatorManagement.cpp b/src/ServiceLocatorManagement.cpp
index 0cfd407..64b15ab 100644
--- a/src/ServiceLocatorManagement.cpp
+++ b/src/ServiceLocatorManagement.cpp
@@ -380,7 +380,7 @@ static string debugPrintParams(const ServiceLocatorParamsPtr& params)
 void ServiceLocatorManagementImpl::locate(const AMD_ServiceLocator_locatePtr& cb,
     const ServiceLocatorParamsPtr& params)
 {
-    lg(Debug) << "locate(" << debugPrintParams(params);
+    lg(Trace) << "locate(" << debugPrintParams(params);
     boost::shared_lock<boost::shared_mutex> lock(mImpl->mLock);
 
     LocateCollectorPtr collector = new LocateOneCollector(cb,
@@ -400,7 +400,7 @@ void ServiceLocatorManagementImpl::locateAll(
     const AMD_ServiceLocator_locateAllPtr& cb,
     const ServiceLocatorParamsPtr& params)
 {
-    lg(Debug) << "locateAll(" << debugPrintParams(params);
+    lg(Trace) << "locateAll(" << debugPrintParams(params);
     boost::shared_lock<boost::shared_mutex> lock(mImpl->mLock);
 
     LocateCollectorPtr collector = new LocateAllCollector(cb,
@@ -487,7 +487,7 @@ ServiceInfo ServiceLocatorManagementImpl::getService(const std::string &guid, co
 void ServiceLocatorManagementImpl::addCompare(const string& guid,
     const ServiceLocatorParamsComparePrx& service, const Ice::Current&)
 {
-    lg(Info) << "addCompare(" << guid << ')';
+    lg(Debug) << "addCompare(" << guid << ')';
     boost::unique_lock<boost::shared_mutex> lock(mImpl->mLock);
 
     pair<map<string, ServiceLocatorParamsComparePrx>::iterator, bool> insertPair =
@@ -509,7 +509,7 @@ void ServiceLocatorManagementImpl::addCompare(const string& guid,
  */
 void ServiceLocatorManagementImpl::removeCompare(const string& guid, const Ice::Current&)
 {
-    lg(Info) << "removeCompare(" << guid << ')';
+    lg(Debug) << "removeCompare(" << guid << ')';
     boost::unique_lock<boost::shared_mutex> lock(mImpl->mLock);
     std::map<std::string, ServiceLocatorParamsComparePrx>::size_type erased = mImpl->mCompares.erase(guid);
 
@@ -574,7 +574,7 @@ void ServiceLocatorManagementImpl::finish_isSupported(
 void ServiceLocatorManagementImpl::removeService(
     const ServiceManagementImplPtr& service)
 {
-    lg(Info) << "removeService(" << service->getGuid() << ')';
+    lg(Debug) << "removeService(" << service->getGuid() << ')';
     boost::unique_lock<boost::shared_mutex> lock(mImpl->mLock);
     for (vector<ServiceManagementImplPtr>::iterator existingService =
              mImpl->mServices.begin();
diff --git a/src/ServiceManagement.cpp b/src/ServiceManagement.cpp
index 2beec01..8434976 100644
--- a/src/ServiceManagement.cpp
+++ b/src/ServiceManagement.cpp
@@ -255,7 +255,7 @@ void ServiceManagementImpl::isSupported(const ServiceLocatorParamsPtr& params, c
      */
     if (mImpl->mStateItem->suspended)
     {
-        lg(Debug) << "  ...isSupported" << debugPrintParams(params) + " = false (suspended)\n";
+        lg(Trace) << "  ...isSupported" << debugPrintParams(params) + " = false (suspended)\n";
         callback->result(false);
         return;
     }
@@ -302,7 +302,7 @@ bool ServiceLocatorParamsSpec::isSupported(const ServiceLocatorParamsPtr& params
         // Is this the wrong category?
         if (mStateItem->params->category != params->category)
         {
-            lg(Debug) << "  ...isSupported" << debugPrintParams(params) + " = false. Different category=" + mStateItem->params->category;
+            lg(Trace) << "  ...isSupported" << debugPrintParams(params) + " = false. Different category=" + mStateItem->params->category;
 
             callback->result(false);
             return false;
@@ -322,7 +322,7 @@ bool ServiceLocatorParamsSpec::isSupported(const ServiceLocatorParamsPtr& params
 
         // Ignore the id and treat this as a wildcard search. 
 
-        lg(Debug) << "  ...isSupported" << debugPrintParams(params) + " = true. Category match explicit, wildcard match service.";
+        lg(Trace) << "  ...isSupported" << debugPrintParams(params) + " = true. Category match explicit, wildcard match service.";
         callback->result(true);
         return true;
     }
@@ -330,7 +330,7 @@ bool ServiceLocatorParamsSpec::isSupported(const ServiceLocatorParamsPtr& params
     // Wrong service?
     if (mStateItem->params->service != params->service)
     {
-        lg(Debug) << "  ...isSupported" << debugPrintParams(params) + " = false. Different service =" + mStateItem->params->service ;
+        lg(Trace) << "  ...isSupported" << debugPrintParams(params) + " = false. Different service =" + mStateItem->params->service ;
         callback->result(false);
         return false;
     }
@@ -341,7 +341,7 @@ bool ServiceLocatorParamsSpec::isSupported(const ServiceLocatorParamsPtr& params
         // Wrong instance?
         if (mStateItem->params->id != params->id)
         {
-            lg(Debug) << "  ...isSupported" << debugPrintParams(params) + " = false. Different id = " + mStateItem->params->id;
+            lg(Trace) << "  ...isSupported" << debugPrintParams(params) + " = false. Different id = " + mStateItem->params->id;
             callback->result(false);
             return false;
         }
@@ -356,7 +356,7 @@ bool ServiceLocatorParamsSpec::isSupported(const ServiceLocatorParamsPtr& params
 
     // If we get here we have a match on service and id. 
     // (and category, if one was passed in.) 
-    lg(Debug) << "  ...isSupported" << debugPrintParams(params) + " = true";
+    lg(Trace) << "  ...isSupported" << debugPrintParams(params) + " = true";
     callback->result(true);
     return true;
 }

commit 4e51c78b3c1b3e58cd792b5cdc9ee84e0897536e
Author: David M. Lee <dlee at digium.com>
Date:   Thu Oct 20 16:39:35 2011 -0500

    Fixed unused variable warning

diff --git a/test/TestServiceLocator.cpp b/test/TestServiceLocator.cpp
index 7a60b11..ccf4122 100644
--- a/test/TestServiceLocator.cpp
+++ b/test/TestServiceLocator.cpp
@@ -212,7 +212,7 @@ struct GlobalIceFixture
             cerr << msg << endl;
             status = 1;
         }
-
+        BOOST_CHECK_EQUAL(0, status);
     } // end Fixture() constructor
 
     ~GlobalIceFixture()

commit e371a1ed94d84f6b56ae0dfbf3be6840c05871eb
Author: David M. Lee <dlee at digium.com>
Date:   Thu Sep 29 14:42:39 2011 -0500

    Use getBooleanPropertyValueWithDefault for consistency

diff --git a/src/ServiceLocator.cpp b/src/ServiceLocator.cpp
index 9bd0eaa..b7ec895 100644
--- a/src/ServiceLocator.cpp
+++ b/src/ServiceLocator.cpp
@@ -18,6 +18,7 @@
 #include <IceStorm/IceStorm.h>
 #include <IceBox/IceBox.h>
 
+#include <AsteriskSCF/Helpers/PropertyHelper.h>
 #include <AsteriskSCF/Core/Discovery/ServiceLocatorIf.h>
 #include <AsteriskSCF/Core/Discovery/ServiceLocatorEventsIf.h>
 #include <AsteriskSCF/logger.h>
@@ -30,6 +31,7 @@
 #include "ServiceLocatorStateReplicator.h"
 
 using namespace std;
+using namespace AsteriskSCF;
 using namespace AsteriskSCF::System::Discovery;
 using namespace AsteriskSCF::System::Logging;
 using namespace AsteriskSCF::Core::Discovery::V1;
@@ -254,7 +256,7 @@ void ServiceLocatorApp::start(const string& appName, const Ice::CommunicatorPtr&
 
 	locatorServiceManagement->setStateReplicator(mStateReplicator);
 
-        if (communicator->getProperties()->getPropertyWithDefault(appName + ".Standalone", "no") == "yes")
+        if (getBooleanPropertyValueWithDefault(communicator->getProperties(), appName + ".Standalone", false))
         {
 	    mReplicaService->standby();
             mStateReplicator->addListener(replicatorListenerProxy);

commit e5c490b5aedc277148166ce0b7c2445c276bc610
Author: Ken Hunt <ken.hunt at digium.com>
Date:   Thu Sep 22 13:05:42 2011 -0500

    Made some of the debug print easier to decipher.

diff --git a/src/ServiceManagement.cpp b/src/ServiceManagement.cpp
index ab08c00..2beec01 100644
--- a/src/ServiceManagement.cpp
+++ b/src/ServiceManagement.cpp
@@ -302,7 +302,7 @@ bool ServiceLocatorParamsSpec::isSupported(const ServiceLocatorParamsPtr& params
         // Is this the wrong category?
         if (mStateItem->params->category != params->category)
         {
-            lg(Debug) << "  ...isSupported" << debugPrintParams(params) + " = false (different categories)\n";
+            lg(Debug) << "  ...isSupported" << debugPrintParams(params) + " = false. Different category=" + mStateItem->params->category;
 
             callback->result(false);
             return false;
@@ -321,6 +321,8 @@ bool ServiceLocatorParamsSpec::isSupported(const ServiceLocatorParamsPtr& params
         }
 
         // Ignore the id and treat this as a wildcard search. 
+
+        lg(Debug) << "  ...isSupported" << debugPrintParams(params) + " = true. Category match explicit, wildcard match service.";
         callback->result(true);
         return true;
     }
@@ -328,7 +330,7 @@ bool ServiceLocatorParamsSpec::isSupported(const ServiceLocatorParamsPtr& params
     // Wrong service?
     if (mStateItem->params->service != params->service)
     {
-        lg(Debug) << "  ...isSupported" << debugPrintParams(params) + " = false (different services)\n";
+        lg(Debug) << "  ...isSupported" << debugPrintParams(params) + " = false. Different service =" + mStateItem->params->service ;
         callback->result(false);
         return false;
     }
@@ -339,7 +341,7 @@ bool ServiceLocatorParamsSpec::isSupported(const ServiceLocatorParamsPtr& params
         // Wrong instance?
         if (mStateItem->params->id != params->id)
         {
-            lg(Debug) << "  ...isSupported" << debugPrintParams(params) + " = false (different id)\n";
+            lg(Debug) << "  ...isSupported" << debugPrintParams(params) + " = false. Different id = " + mStateItem->params->id;
             callback->result(false);
             return false;
         }
@@ -354,6 +356,7 @@ bool ServiceLocatorParamsSpec::isSupported(const ServiceLocatorParamsPtr& params
 
     // If we get here we have a match on service and id. 
     // (and category, if one was passed in.) 
+    lg(Debug) << "  ...isSupported" << debugPrintParams(params) + " = true";
     callback->result(true);
     return true;
 }

commit 46cd353e6e9c738ca42c9aa24913bc95ad4f3699
Author: Ken Hunt <ken.hunt at digium.com>
Date:   Tue Sep 20 15:59:30 2011 -0500

    Added default adapter port settings to make it easier to use ServiceLocator in unit tests.
    Made default port usage consistent.

diff --git a/config/test_component.conf b/config/test_component.conf
index 2cca6a6..18866fe 100644
--- a/config/test_component.conf
+++ b/config/test_component.conf
@@ -29,10 +29,10 @@ ServiceDiscovery.BackplaneAdapter.Endpoints=tcp -p 4410
 ServiceDiscovery.Locator.ServiceAdapter.Endpoints=tcp -p 4411
 
 # Test endpoints for the service locator management adapter
-ServiceDiscovery.Management.ServiceAdapter.Endpoints=tcp -p 4422
+ServiceDiscovery.Management.ServiceAdapter.Endpoints=tcp -p 4412
 
 # Name for the IceStorm instance
-ServiceDiscovery.IceStorm.InstanceName=ServiceDiscoveryIceStorm
+ServiceDiscovery.IceStorm.InstanceName=ServiceDiscovery
 
 # Proxy to the state replicator
 ServiceDiscovery.StateReplicator.Proxy=ServiceLocatorStateReplicatorService:tcp -p 4413
@@ -40,14 +40,11 @@ ServiceDiscovery.StateReplicator.Proxy=ServiceLocatorStateReplicatorService:tcp
 # Configure ourselves as a master
 ServiceDiscovery.Standalone=no
 
-ServiceDiscoveryIceStorm.InstanceName=ServiceDiscoveryIceStorm
-ServiceDiscoveryIceStorm.IceStorm.InstanceName=ServiceDiscoveryIceStorm
-ServiceDiscoveryIceStorm.TopicManager.Endpoints=default -p 4421
-ServiceDiscoveryIceStorm.IceStorm.TopicManager.Endpoints=default -p 4421
-ServiceDiscoveryIceStorm.Publish.Endpoints=default -p 4423
-ServiceDiscoveryIceStorm.Trace.TopicManager=2
-ServiceDiscoveryIceStorm.Transient=1
-ServiceDiscoveryIceStorm.Flush.Timeout=2000
+ServiceDiscovery.IceStorm.TopicManager.Endpoints=default -p 4421
+ServiceDiscovery.IceStorm.Publish.Endpoints=tcp -p 4422:udp -p 4422
+ServiceDiscovery.IceStorm.Trace.TopicManager=2
+ServiceDiscovery.IceStorm.Transient=1
+ServiceDiscovery.IceStorm.Flush.Timeout=2000
 
 #
 # ServiceDiscoveryReplicator configuration
@@ -57,15 +54,9 @@ IceBox.Service.ServiceDiscoveryStateReplicator=ServiceLocatorStateReplicator:cre
 # Test endpoints for the state replicator
 ServiceDiscoveryStateReplicator.Adapter.Endpoints=tcp -p 4413:udp -p 4413
 
-#
-# Logger configuration
-#
-LoggerAdapter.Endpoints=default
-
-#
 # test configuration
-#
 IceBox.Service.ServiceDiscoveryTest=service_locator_test:create
 
 LocatorService.Proxy=LocatorService:tcp -p 4411
+LocatorServiceManagement.Proxy=LocatorServiceManagement:tcp -p 4412
 
diff --git a/src/ServiceLocator.cpp b/src/ServiceLocator.cpp
index 1000781..9bd0eaa 100644
--- a/src/ServiceLocator.cpp
+++ b/src/ServiceLocator.cpp
@@ -172,7 +172,9 @@ void ServiceLocatorApp::start(const string& appName, const Ice::CommunicatorPtr&
                                                                             appName + ".IceStorm.InstanceName", "ServiceDiscovery"),
                                                                         communicator->getProperties());
 
-    mLocalAdapter = communicator->createObjectAdapter(appName + ".BackplaneAdapter");
+    string backplaneAdapterName = appName + ".BackplaneAdapter";
+    mLocalAdapter = communicator->createObjectAdapterWithEndpoints(backplaneAdapterName,
+        communicator->getProperties()->getPropertyWithDefault(backplaneAdapterName + ".Endpoints", "tcp -p 4410"));
 
     ConfiguredIceLoggerPtr mIceLogger = createIceLogger(mLocalAdapter);
 
@@ -231,8 +233,10 @@ void ServiceLocatorApp::start(const string& appName, const Ice::CommunicatorPtr&
      * management may want to be protected so arbitrary people can't inject bad services
      * into the infrastructure while discovery as a read only function may be allowed to all.
      */
-    mManagementAdapter= communicator->createObjectAdapter(
-        appName + ".Management.ServiceAdapter");
+
+    string managementAdapterName = appName + ".Management.ServiceAdapter";
+    mManagementAdapter = communicator->createObjectAdapterWithEndpoints(managementAdapterName,
+        communicator->getProperties()->getPropertyWithDefault(managementAdapterName + ".Endpoints", "tcp -p 4412"));
 
     ServiceLocatorManagementImplPtr locatorServiceManagement =
         new ServiceLocatorManagementImpl(mManagementAdapter, serviceDiscoveryTopic, mReplicaService);
@@ -273,7 +277,9 @@ void ServiceLocatorApp::start(const string& appName, const Ice::CommunicatorPtr&
 
     lg(Info) << "Activated service discovery management.";
 
-    mDiscoveryAdapter = communicator->createObjectAdapter(appName + ".Locator.ServiceAdapter");
+    string locatorAdapterName = appName + ".Locator.ServiceAdapter";
+    mDiscoveryAdapter = communicator->createObjectAdapterWithEndpoints(locatorAdapterName,
+        communicator->getProperties()->getPropertyWithDefault(locatorAdapterName + ".Endpoints", "tcp -p 4411"));
 
     ServiceLocatorPtr locatorService = new ServiceLocatorImpl(locatorServiceManagement);
 
diff --git a/test/TestComparatorBlocking.cpp b/test/TestComparatorBlocking.cpp
index c8cc599..8827fc2 100644
--- a/test/TestComparatorBlocking.cpp
+++ b/test/TestComparatorBlocking.cpp
@@ -145,7 +145,7 @@ public:
         discoveryCommunicator(Ice::initialize()),
         management(ServiceLocatorManagementPrx::checkedCast(
                 discoveryCommunicator->stringToProxy(
-                    "LocatorServiceManagement:tcp -p 4422"))),
+                    "LocatorServiceManagement:tcp -p 4412"))),
         discovery(ServiceLocatorPrx::checkedCast(
                 discoveryCommunicator->stringToProxy(
                     "LocatorService:tcp -p 4411"))),
diff --git a/test/TestServiceLocator.cpp b/test/TestServiceLocator.cpp
index d9d6ef4..7a60b11 100644
--- a/test/TestServiceLocator.cpp
+++ b/test/TestServiceLocator.cpp
@@ -188,7 +188,7 @@ struct GlobalIceFixture
 
             // TODO: This should use a configuration file most likely instead of hardcoding
 
-            testbed.management = ServiceLocatorManagementPrx::checkedCast(testbed.communicatorOutgoing->stringToProxy("LocatorServiceManagement:tcp -p 4422"));
+            testbed.management = ServiceLocatorManagementPrx::checkedCast(testbed.communicatorOutgoing->stringToProxy("LocatorServiceManagement:tcp -p 4412"));
 
             if (!testbed.management)
             {

commit 42a97b75bd20881b77d681ccd4ee00bb91577420
Author: Joshua Colp <jcolp at digium.com>
Date:   Mon Sep 19 16:14:47 2011 -0300

    Make the service locator conform to the configuration file in the examples repo.

diff --git a/config/test_component.conf b/config/test_component.conf
new file mode 100644
index 0000000..2cca6a6
--- /dev/null
+++ b/config/test_component.conf
@@ -0,0 +1,71 @@
+# This is a configuration file used in conjunction with the service discovery test driver
+
+#
+# Ice configuration
+#
+
+# Collocation is incompatible with AMI/AMD which sharing a communicator
+Ice.Default.CollocationOptimized=0
+
+#
+# icebox configuration
+#
+IceBox.InheritProperties=1
+
+#
+# IceBox load order
+#
+IceBox.LoadOrder=ServiceDiscoveryStateReplicator,ServiceDiscovery,ServiceDiscoveryTest
+
+#
+# ServiceDiscovery configuration
+#
+IceBox.Service.ServiceDiscovery=service_locator:create
+
+# Test endpoints for the service locator local adapter
+ServiceDiscovery.BackplaneAdapter.Endpoints=tcp -p 4410
+
+# Test endpoints for the service locator discovery adapter
+ServiceDiscovery.Locator.ServiceAdapter.Endpoints=tcp -p 4411
+
+# Test endpoints for the service locator management adapter
+ServiceDiscovery.Management.ServiceAdapter.Endpoints=tcp -p 4422
+
+# Name for the IceStorm instance
+ServiceDiscovery.IceStorm.InstanceName=ServiceDiscoveryIceStorm
+
+# Proxy to the state replicator
+ServiceDiscovery.StateReplicator.Proxy=ServiceLocatorStateReplicatorService:tcp -p 4413
+
+# Configure ourselves as a master
+ServiceDiscovery.Standalone=no
+
+ServiceDiscoveryIceStorm.InstanceName=ServiceDiscoveryIceStorm
+ServiceDiscoveryIceStorm.IceStorm.InstanceName=ServiceDiscoveryIceStorm
+ServiceDiscoveryIceStorm.TopicManager.Endpoints=default -p 4421
+ServiceDiscoveryIceStorm.IceStorm.TopicManager.Endpoints=default -p 4421
+ServiceDiscoveryIceStorm.Publish.Endpoints=default -p 4423
+ServiceDiscoveryIceStorm.Trace.TopicManager=2
+ServiceDiscoveryIceStorm.Transient=1
+ServiceDiscoveryIceStorm.Flush.Timeout=2000
+
+#
+# ServiceDiscoveryReplicator configuration
+#
+IceBox.Service.ServiceDiscoveryStateReplicator=ServiceLocatorStateReplicator:create
+
+# Test endpoints for the state replicator
+ServiceDiscoveryStateReplicator.Adapter.Endpoints=tcp -p 4413:udp -p 4413
+
+#
+# Logger configuration
+#
+LoggerAdapter.Endpoints=default
+
+#
+# test configuration
+#
+IceBox.Service.ServiceDiscoveryTest=service_locator_test:create
+
+LocatorService.Proxy=LocatorService:tcp -p 4411
+
diff --git a/config/test_component.config b/config/test_component.config
deleted file mode 100644
index 812d22f..0000000
--- a/config/test_component.config
+++ /dev/null
@@ -1,88 +0,0 @@
-# This is a configuration file used in conjunction with the service discovery test driver
-
-#
-# Ice configuration
-#
-
-# Collocation is incompatible with AMI/AMD which sharing a communicator
-Ice.Default.CollocationOptimized=0
-
-#
-# icebox configuration
-#
-IceBox.InheritProperties=1
-
-AsteriskSCFIceStorm.InstanceName=AsteriskSCFIceStorm
-
-#
-# This property defines the endpoints on which the IceStorm
-# TopicManager listens.
-#
-AsteriskSCFIceStorm.TopicManager.Endpoints=default -p 10000
-
-#
-# This property defines the endpoints on which the topic
-# publisher objects listen. If you want to federate
-# IceStorm instances this must run on a fixed port (or use
-# IceGrid).
-#
-AsteriskSCFIceStorm.Publish.Endpoints=tcp -p 10001:udp -p 10001
-
-#
-# TopicManager Tracing
-#
-# 0 = no tracing
-# 1 = trace topic creation, subscription, unsubscription
-# 2 = like 1, but with more detailed subscription information
-#
-AsteriskSCFIceStorm.Trace.TopicManager=2
-
-#
-AsteriskSCFIceStorm.Flush.Timeout=2000
-
-# Service Locator State Replicator Configuration
-IceBox.Service.ServiceDiscoveryStateReplicator=ServiceLocatorStateReplicator:create
-
-# Test endpoints for the state replicator
-ServiceLocatorStateReplicator.Endpoints=tcp -p 4413:udp -p 4413
-
-#
-# ServiceDiscovery configuration
-#
-IceBox.Service.ServiceDiscovery=service_locator:create
-
-# Test endpoints for the service locator local adapter
-ServiceLocatorLocalAdapter.Endpoints=tcp -p 4412
-
-# Test endpoints for the service locator management adapter
-ServiceLocatorManagementAdapter.Endpoints=tcp -p 4422
-
-# Test endpoints for the service locator adapter
-ServiceLocatorAdapter.Endpoints=tcp -p 4411
-
-# Test endpoints for IceStorm
-TopicManager.Proxy=AsteriskSCFIceStorm/TopicManager:default -p 10000
-
-# Proxy to the state replicator
-ServiceLocator.StateReplicator.Proxy=ServiceLocatorStateReplicatorService:tcp -p 4413
-
-# Configure ourselves as a master
-ServiceLocatorStateReplicatorListener=no
-
-#
-# Logger configuration
-#
-LoggerAdapter.Endpoints=default
-
-#
-# test configuration
-#
-IceBox.Service.ServiceDiscoveryTest=service_locator_test:create
-
-LocatorService.Proxy=LocatorService:tcp -p 4411
-ServiceLocatorManagement.proxy=ServiceLocatorManagement:tcp -p 4422
-
-#
-# IceBox load order
-#
-IceBox.LoadOrder=ServiceDiscoveryStateReplicator,ServiceDiscovery,ServiceDiscoveryTest
diff --git a/config/test_service_locator.config b/config/test_service_locator.config
deleted file mode 100644
index 2ad533f..0000000
--- a/config/test_service_locator.config
+++ /dev/null
@@ -1,65 +0,0 @@
-# This is a configuration file used in conjunction with the service discovery test driver
-
-
-#
-# Ice configuration
-#
-
-# Collocation is incompatible with AMI/AMD which sharing a communicator
-Ice.Default.CollocationOptimized=0
-
-#
-# IceBox configuration
-#
-
-IceBox.InheritProperties=1
-IceBox.Service.ServiceDiscovery=service_locator:create
-
-AsteriskSCFIceStorm.InstanceName=AsteriskSCFIceStorm
-#
-# This property defines the endpoints on which the IceStorm
-# TopicManager listens.
-#
-AsteriskSCFIceStorm.TopicManager.Endpoints=default -p 10000
-
-#
-# This property defines the endpoints on which the topic
-# publisher objects listen. If you want to federate
-# IceStorm instances this must run on a fixed port (or use
-# IceGrid).
-#
-AsteriskSCFIceStorm.Publish.Endpoints=tcp -p 10001:udp -p 10001
-
-#
-# TopicManager Tracing
-#
-# 0 = no tracing
-# 1 = trace topic creation, subscription, unsubscription
-# 2 = like 1, but with more detailed subscription information
-#
-AsteriskSCFIceStorm.Trace.TopicManager=2
-AsteriskSCFIceStorm.Transient=1
-
-#
-AsteriskSCFIceStorm.Flush.Timeout=2000
-# This is a configuration file used in conjunction with the service locator test driver
-
-# Test endpoints for the service locator management adapter
-ServiceLocatorManagementAdapter.Endpoints=tcp -p 4422
-
-# Test endpoints for the service locator local adapter
-ServiceLocatorLocalAdapter.Endpoints=tcp -p 4412
-
-# Test endpoints for the service locator adapter
-ServiceLocatorAdapter.Endpoints=tcp -p 4411
-LocatorService.Proxy=LocatorService:tcp -p 4411
-
-ServiceLocator.StateReplicator.Proxy=ServiceLocatorStateReplicatorService:tcp -p 4413
-
-ServiceLocatorStateReplicatorListener=no
-
-# Test endpoints for IceStorm
-TopicManager.Proxy=AsteriskSCFIceStorm/TopicManager:default -p 10000
-
-# Logger configuration
-LoggerAdapter.Endpoints=default
diff --git a/config/test_service_locator_listener.config b/config/test_service_locator_listener.config
deleted file mode 100644
index 12f1482..0000000
--- a/config/test_service_locator_listener.config
+++ /dev/null
@@ -1,65 +0,0 @@
-# This is a configuration file used in conjunction with the service discovery test driver
-
-
-#
-# Ice configuration
-#
-
-# Collocation is incompatible with AMI/AMD which sharing a communicator
-Ice.Default.CollocationOptimized=0
-
-#
-# IceBox configuration
-#
-
-IceBox.InheritProperties=1
-IceBox.Service.ServiceDiscovery=service_locator:create
-
-AsteriskSCFIceStorm.InstanceName=AsteriskSCFIceStorm
-#
-# This property defines the endpoints on which the IceStorm
-# TopicManager listens.
-#
-AsteriskSCFIceStorm.TopicManager.Endpoints=default -p 10000
-
-#
-# This property defines the endpoints on which the topic
-# publisher objects listen. If you want to federate
-# IceStorm instances this must run on a fixed port (or use
-# IceGrid).
-#
-AsteriskSCFIceStorm.Publish.Endpoints=tcp -p 10001:udp -p 10001
-
-#
-# TopicManager Tracing
-#
-# 0 = no tracing
-# 1 = trace topic creation, subscription, unsubscription
-# 2 = like 1, but with more detailed subscription information
-#
-AsteriskSCFIceStorm.Trace.TopicManager=2
-AsteriskSCFIceStorm.Transient=1
-
-#
-AsteriskSCFIceStorm.Flush.Timeout=2000
-# This is a configuration file used in conjunction with the service locator test driver
-
-# Test endpoints for the service locator management adapter
-ServiceLocatorManagementAdapter.Endpoints=tcp -p 4422
-
-# Test endpoints for the service locator local adapter
-ServiceLocatorLocalAdapter.Endpoints=tcp -p 4412
-
-# Test endpoints for the service locator adapter
-ServiceLocatorAdapter.Endpoints=tcp -p 4411
-LocatorService.Proxy=LocatorService:tcp -p 4411
-
-ServiceLocator.StateReplicator.Proxy=ServiceLocatorStateReplicatorService:tcp -p 4413
-
-ServiceLocatorStateReplicatorListener=yes
-
-# Test endpoints for IceStorm
-TopicManager.Proxy=AsteriskSCFIceStorm/TopicManager:default -p 10000
-
-# Logger configuration
-LoggerAdapter.Endpoints=default
diff --git a/config/test_servicelocator_state_replicator.conf b/config/test_servicelocator_state_replicator.conf
deleted file mode 100644
index 98a48d4..0000000
--- a/config/test_servicelocator_state_replicator.conf
+++ /dev/null
@@ -1,11 +0,0 @@
... 24622 lines suppressed ...


-- 
asterisk-scf/integration/servicediscover.git



More information about the asterisk-scf-commits mailing list