[asterisk-scf-commits] asterisk-scf/integration/servicediscovery.git branch "publish-internals" created.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Fri Nov 11 13:50:00 CST 2011


branch "publish-internals" has been created
        at  45aeff5705396413ea67a839b5f11c1e51f418df (commit)

- Log -----------------------------------------------------------------
commit 45aeff5705396413ea67a839b5f11c1e51f418df
Author: Joshua Colp <jcolp at digium.com>
Date:   Fri Nov 11 15:50:34 2011 -0400

    Add first stab at publishg IceStorm topic manager and service locator management. Will probably change.

diff --git a/src/ServiceLocator.cpp b/src/ServiceLocator.cpp
index 2522101..22018fa 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"), "manage");
+
+    // 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, "IceStorm", Ice::Current());
+	ServiceLocatorParamsPtr params = new ServiceLocatorParams;
+	params->category = CategoryIceStorm;
+	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..b7acb5a 100644
--- a/test/TestServiceLocator.cpp
+++ b/test/TestServiceLocator.cpp
@@ -239,6 +239,16 @@ 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(CategoryIceStorm, "default");
+
+    BOOST_CHECK(found);
+}
+
+/**
  * Confirm that we find no service using locate before we have added one.
  */
 BOOST_AUTO_TEST_CASE(ServiceNotFoundBeforeAdd)
@@ -540,7 +550,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 @@
-# Adapter parameters for this component
-ServiceLocatorStateReplicator.Endpoints=tcp -p 4413:udp -p 4413
-ServiceLocatorStateReplicator.ThreadPool.Size=4
-
-# A proxy to the IceStorm topic manager
-TopicManager.Proxy=AsteriskSCFIceStorm/TopicManager:default -p 10000
-
-LocatorService.Proxy=LocatorService:tcp -p 4411
-
-IceBox.InheritProperties=1
-IceBox.Service.ServiceLocatorStateReplicator=ServiceLocatorStateReplicator:create
diff --git a/src/ServiceLocator.cpp b/src/ServiceLocator.cpp
index 34fe063..1000781 100644
--- a/src/ServiceLocator.cpp
+++ b/src/ServiceLocator.cpp
@@ -165,12 +165,14 @@ void ServiceLocatorImpl::locateAll_async(const AMD_ServiceLocator_locateAllPtr&
     mLocatorServiceManagement->locateAll(cb, params);
 }
 
-void ServiceLocatorApp::start(const string&, const Ice::CommunicatorPtr& communicator,
+void ServiceLocatorApp::start(const string& appName, const Ice::CommunicatorPtr& communicator,
     const Ice::StringSeq&)
 {
-    mIceStorm = new AsteriskSCF::CollocatedIceStorm::CollocatedIceStorm("AsteriskSCFIceStorm", communicator->getProperties());
+    mIceStorm = new AsteriskSCF::CollocatedIceStorm::CollocatedIceStorm(communicator->getProperties()->getPropertyWithDefault(
+                                                                            appName + ".IceStorm.InstanceName", "ServiceDiscovery"),
+                                                                        communicator->getProperties());
 
-    mLocalAdapter = communicator->createObjectAdapter("ServiceLocatorLocalAdapter");
+    mLocalAdapter = communicator->createObjectAdapter(appName + ".BackplaneAdapter");
 
     ConfiguredIceLoggerPtr mIceLogger = createIceLogger(mLocalAdapter);
 
@@ -182,15 +184,14 @@ void ServiceLocatorApp::start(const string&, const Ice::CommunicatorPtr& communi
 
     /* Talk to the topic manager to either create or get the service discovery topic,
      * configured or default */
-    IceStorm::TopicManagerPrx topicManager = IceStorm::TopicManagerPrx::checkedCast(
-        communicator->propertyToProxy("TopicManager.Proxy"));
+    IceStorm::TopicManagerPrx topicManager = mIceStorm->createTopicManagerProxy(communicator);
 
     EventsPrx serviceDiscoveryTopic;
 
     if (topicManager)
     {
         Ice::PropertiesPtr props = communicator->getProperties();
-        string topicName = props->getProperty("ServiceLocator.TopicName");
+        string topicName = props->getProperty(appName + ".TopicName");
 
         if (topicName.empty())
         {
@@ -231,7 +232,7 @@ void ServiceLocatorApp::start(const string&, const Ice::CommunicatorPtr& communi
      * into the infrastructure while discovery as a read only function may be allowed to all.
      */
     mManagementAdapter= communicator->createObjectAdapter(
-        "ServiceLocatorManagementAdapter");
+        appName + ".Management.ServiceAdapter");
 
     ServiceLocatorManagementImplPtr locatorServiceManagement =
         new ServiceLocatorManagementImpl(mManagementAdapter, serviceDiscoveryTopic, mReplicaService);
@@ -243,13 +244,13 @@ void ServiceLocatorApp::start(const string&, const Ice::CommunicatorPtr& communi
 
     try
     {
-	mStateReplicator = ServiceLocatorStateReplicatorPrx::checkedCast(communicator->propertyToProxy("ServiceLocator.StateReplicator.Proxy"));
+	mStateReplicator = ServiceLocatorStateReplicatorPrx::checkedCast(communicator->propertyToProxy(appName + ".StateReplicator.Proxy"));
         ServiceLocatorStateReplicatorListenerPtr replicatorListener = new ServiceLocatorStateReplicatorListenerI(locatorServiceManagement);
         ServiceLocatorStateReplicatorListenerPrx replicatorListenerProxy = ServiceLocatorStateReplicatorListenerPrx::uncheckedCast(mLocalAdapter->addWithUUID(replicatorListener));
 
 	locatorServiceManagement->setStateReplicator(mStateReplicator);
 
-        if (communicator->getProperties()->getPropertyWithDefault("ServiceLocatorStateReplicatorListener", "no") == "yes")
+        if (communicator->getProperties()->getPropertyWithDefault(appName + ".Standalone", "no") == "yes")
         {
 	    mReplicaService->standby();
             mStateReplicator->addListener(replicatorListenerProxy);
@@ -272,7 +273,7 @@ void ServiceLocatorApp::start(const string&, const Ice::CommunicatorPtr& communi
 
     lg(Info) << "Activated service discovery management.";
 
-    mDiscoveryAdapter = communicator->createObjectAdapter("ServiceLocatorAdapter");
+    mDiscoveryAdapter = communicator->createObjectAdapter(appName + ".Locator.ServiceAdapter");
 
     ServiceLocatorPtr locatorService = new ServiceLocatorImpl(locatorServiceManagement);
 
diff --git a/src/ServiceLocatorStateReplicatorApp.cpp b/src/ServiceLocatorStateReplicatorApp.cpp
index 93bd340..23378f7 100644
--- a/src/ServiceLocatorStateReplicatorApp.cpp
+++ b/src/ServiceLocatorStateReplicatorApp.cpp
@@ -86,7 +86,7 @@ private:
 
 void ServiceLocatorStateReplicatorService::initialize(const std::string appName, const Ice::CommunicatorPtr& ic)
 {
-    mAdapter = ic->createObjectAdapter("ServiceLocatorStateReplicator");
+    mAdapter = ic->createObjectAdapter(appName + ".Adapter");
 
     // setup logging client
     mIceLogger = createIceLogger(mAdapter);
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index d5cf790..bbfa333 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -5,6 +5,6 @@ astscf_component_add_ice_libraries(service_locator_test IceStorm)
 astscf_component_add_boost_libraries(service_locator_test unit_test_framework thread date_time)
 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.config)
+astscf_test_icebox(service_locator_test config/test_component.conf)
 
 file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/AsteriskSCFIceStorm)

commit 8b7006f218db702c9afcefefc892ea55f11e0e78
Author: Ken Hunt <ken.hunt at digium.com>
Date:   Tue Jun 21 11:45:58 2011 -0500

    Expanded ServiceLocatorParams.

diff --git a/src/ServiceLocatorManagement.cpp b/src/ServiceLocatorManagement.cpp
index 28168cd..0cfd407 100644
--- a/src/ServiceLocatorManagement.cpp
+++ b/src/ServiceLocatorManagement.cpp
@@ -370,10 +370,17 @@ ServiceLocatorManagementImpl::ServiceLocatorManagementImpl(
 {
 }
 
+static string debugPrintParams(const ServiceLocatorParamsPtr& params)
+{
+    string result;
+    result = "(category=" + params->category + ", service=" + params->service + ", id=" + params->id + ")";
+    return result;
+}
+
 void ServiceLocatorManagementImpl::locate(const AMD_ServiceLocator_locatePtr& cb,
     const ServiceLocatorParamsPtr& params)
 {
-    lg(Debug) << "locate(" << params->category << ')';
+    lg(Debug) << "locate(" << debugPrintParams(params);
     boost::shared_lock<boost::shared_mutex> lock(mImpl->mLock);
 
     LocateCollectorPtr collector = new LocateOneCollector(cb,
@@ -393,7 +400,7 @@ void ServiceLocatorManagementImpl::locateAll(
     const AMD_ServiceLocator_locateAllPtr& cb,
     const ServiceLocatorParamsPtr& params)
 {
-    lg(Debug) << "locateAll(" << params->category << ')';
+    lg(Debug) << "locateAll(" << debugPrintParams(params);
     boost::shared_lock<boost::shared_mutex> lock(mImpl->mLock);
 
     LocateCollectorPtr collector = new LocateAllCollector(cb,
diff --git a/src/ServiceManagement.cpp b/src/ServiceManagement.cpp
index 00397f1..ab08c00 100644
--- a/src/ServiceManagement.cpp
+++ b/src/ServiceManagement.cpp
@@ -56,24 +56,24 @@ public:
     ServiceLocatorParamsSpec(const ServiceLocatorParamsPtr& params,
         const std::string& compareGuid,
         ServiceLocatorManagementImplPtr management,
-	ServiceLocatorServiceStateItemPtr serviceState)
+        ServiceLocatorServiceStateItemPtr serviceState)
         :
-	mStateItem(new ServiceLocatorParamsStateItem()),
+        mStateItem(new ServiceLocatorParamsStateItem()),
         mManagement(management)
     {
-	mStateItem->key = IceUtil::generateUUID();
-	mStateItem->serviceKey = serviceState->key;
-	mStateItem->params = params;
-	mStateItem->compareGuid = compareGuid;
-	mManagement->replicateState(mStateItem);
+        mStateItem->key = IceUtil::generateUUID();
+        mStateItem->serviceKey = serviceState->key;
+        mStateItem->params = params;
+        mStateItem->compareGuid = compareGuid;
+        mManagement->replicateState(mStateItem);
     }
 
     ~ServiceLocatorParamsSpec()
     {
-	mManagement->removeState(mStateItem);
+        mManagement->removeState(mStateItem);
     }
 
-    void isSupported(const AsteriskSCF::Core::Discovery::V1::ServiceLocatorParamsPtr&, const IsSupportedCallbackPtr&);
+    bool isSupported(const AsteriskSCF::Core::Discovery::V1::ServiceLocatorParamsPtr&, const IsSupportedCallbackPtr&);
 
 private:
     /**
@@ -96,20 +96,20 @@ public:
     ServiceManagementImplPriv(ServiceManagementImpl* impl, ServiceLocatorManagementImplPtr management,
         const Ice::ObjectPrx& service, const Ice::ObjectAdapterPtr& adapter, const AsteriskSCF::System::Discovery::EventsPrx& serviceDiscoveryTopic,
         const string& guid, const Ice::Identity& identity) :
-	mStateItem(new ServiceLocatorServiceStateItem()),
+        mStateItem(new ServiceLocatorServiceStateItem()),
         mManagement(management), mAdapter(adapter), mLocatorTopic(serviceDiscoveryTopic)
     {
-	mStateItem->key = IceUtil::generateUUID();
-	mStateItem->suspended = false;
-	mStateItem->service = service;
-	mStateItem->guid = guid;
-	mManagementPrx = ServiceManagementPrx::uncheckedCast(mAdapter->add(impl, identity));
-	mStateItem->managementIdentity = identity;
+        mStateItem->key = IceUtil::generateUUID();
+        mStateItem->suspended = false;
+        mStateItem->service = service;
+        mStateItem->guid = guid;
+        mManagementPrx = ServiceManagementPrx::uncheckedCast(mAdapter->add(impl, identity));
+        mStateItem->managementIdentity = identity;
         if (mLocatorTopic)
         {
             mLocatorTopic->serviceRegistered(guid);
         }
-	mManagement->replicateState(mStateItem);
+        mManagement->replicateState(mStateItem);
     }
 
     /**
@@ -231,6 +231,13 @@ private:
     IsSupportedCallbackPtr mCallback;
 };
 
+static string debugPrintParams(const ServiceLocatorParamsPtr& params)
+{
+    string result;
+    result = "(category=" + params->category + ", service=" + params->service + ", id=" + params->id + ")";
+    return result;
+}
+
 /**
  * An internal function which is called by the service locator to perform a
  * locator parameters comparison at the service level.
@@ -248,7 +255,7 @@ void ServiceManagementImpl::isSupported(const ServiceLocatorParamsPtr& params, c
      */
     if (mImpl->mStateItem->suspended)
     {
-        lg(Debug) << "  ...isSupported(" << params->category << ") = false (suspended)\n";
+        lg(Debug) << "  ...isSupported" << debugPrintParams(params) + " = false (suspended)\n";
         callback->result(false);
         return;
     }
@@ -261,7 +268,12 @@ void ServiceManagementImpl::isSupported(const ServiceLocatorParamsPtr& params, c
          spec != mImpl->mSupportedLocatorParams.end();
          ++spec)
     {
-        (*spec)->isSupported(params, myCallback);
+        if ((*spec)->isSupported(params, myCallback))
+        {
+            // If we get here, a match was found without needing to call an external comparator. 
+            // We are done. 
+            break;
+        }
     }
 }
 
@@ -277,33 +289,73 @@ const std::string& ServiceManagementImpl::getGuid() const
  * @param params A concrete class containing parameters describing the service
  *               that is trying to be found.
  * @param callback Callback to asynchronously rx the results.
+ *
+ * @return True only if we determined a match without any need for calling a custom comparator. 
+ *         Otherwise, the callback may be accumulating the results, or it's not a match. 
  */
-void ServiceLocatorParamsSpec::isSupported(const ServiceLocatorParamsPtr& params, const IsSupportedCallbackPtr& callback)
+bool ServiceLocatorParamsSpec::isSupported(const ServiceLocatorParamsPtr& params, const IsSupportedCallbackPtr& callback)
 {
-    // If no category is passed to us then the component doing the locate wants
-    // everything/anything, so give it to them
-    if (params->category.empty())
+    // Does the component doing the locate 
+    // want to filter based on category. 
+    if (!params->category.empty())
+    {
+        // Is this the wrong category?
+        if (mStateItem->params->category != params->category)
+        {
+            lg(Debug) << "  ...isSupported" << debugPrintParams(params) + " = false (different categories)\n";
+
+            callback->result(false);
+            return false;
+        }
+    }
+
+    // Does the component doing the locate 
+    // want all services in the category? 
+    if (params->service.empty())
     {
-        lg(Debug) << "  ...isSupported(" << params->category << ") = true (empty category)\n";
+        // If a comparator was provided then yield to it. 
+        if (!mStateItem->compareGuid.empty())
+        {
+            mManagement->isSupported(mStateItem->compareGuid, params, callback);
+            return false;
+        }
+
+        // Ignore the id and treat this as a wildcard search. 
         callback->result(true);
+        return true;
     }
-    /* This is just a simple comparison that acts as a preliminary, and
-     * perhaps final, check */
-    else if (mStateItem->params->category != params->category)
+
+    // Wrong service?
+    if (mStateItem->params->service != params->service)
     {
-        lg(Debug) << "  ...isSupported(" << params->category << ") = false (different categories)\n";
+        lg(Debug) << "  ...isSupported" << debugPrintParams(params) + " = false (different services)\n";
         callback->result(false);
+        return false;
     }
-    /* If a comparator was provided then yield to it for a final yay or nay */
-    else if (!mStateItem->compareGuid.empty())
+
+    // Is this query for a specific instance?
+    if (!params->id.empty())
     {
-        mManagement->isSupported(mStateItem->compareGuid, params, callback);
+        // Wrong instance?
+        if (mStateItem->params->id != params->id)
+        {
+            lg(Debug) << "  ...isSupported" << debugPrintParams(params) + " = false (different id)\n";
+            callback->result(false);
+            return false;
+        }
     }
-    /* category matches, no comparator to turn us down.  it's a match. */
-    else
+
+    // If a comparator was provided then yield to it. 
+    if (!mStateItem->compareGuid.empty())
     {
-        callback->result(true);
+        mManagement->isSupported(mStateItem->compareGuid, params, callback);
+        return false;
     }
+
+    // If we get here we have a match on service and id. 
+    // (and category, if one was passed in.) 
+    callback->result(true);
+    return true;
 }
 
 /**
@@ -329,7 +381,7 @@ void ServiceManagementImpl::suspend(const Ice::Current&)
     {
         lg(Info) << "Suspending " << mImpl->mStateItem->guid << " " << mImpl->mStateItem->service->ice_toString();
         mImpl->mStateItem->suspended = true;
-	mImpl->mManagement->replicateState(mImpl->mStateItem);
+        mImpl->mManagement->replicateState(mImpl->mStateItem);
     }
 
     if (mImpl->mLocatorTopic)
@@ -349,7 +401,7 @@ void ServiceManagementImpl::unsuspend(const Ice::Current&)
     {
         lg(Info) << "Un-suspending " << mImpl->mStateItem->guid << " " << mImpl->mStateItem->service->ice_toString();
         mImpl->mStateItem->suspended = false;
-	mImpl->mManagement->replicateState(mImpl->mStateItem);
+        mImpl->mManagement->replicateState(mImpl->mStateItem);
     }
 
     if (mImpl->mLocatorTopic)
@@ -379,17 +431,30 @@ void ServiceManagementImpl::unregister(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.
      */
-    lg(Info) << "Un-register " << mImpl->mStateItem->guid << " " << mImpl->mStateItem->service->ice_toString();
+    try
+    {
+        lg(Info) << "Un-register " << mImpl->mStateItem->guid << " " << mImpl->mStateItem->service->ice_toString();
 
-    mImpl->mManagement->removeState(mImpl->mStateItem);
+        mImpl->mManagement->removeState(mImpl->mStateItem);
 
-    mImpl->mAdapter->remove(mImpl->mManagementPrx->ice_getIdentity());
+        mImpl->mAdapter->remove(mImpl->mManagementPrx->ice_getIdentity());
 
-    mImpl->mManagement->removeService(this);
+        mImpl->mManagement->removeService(this);
 
-    if (mImpl->mLocatorTopic)
+        if (mImpl->mLocatorTopic)
+        {
+            mImpl->mLocatorTopic->serviceUnregistered(mImpl->mStateItem->guid);
+        }
+    }
+    catch(const std::exception& e)
+    {
+        lg(Error) << BOOST_CURRENT_FUNCTION << " : " << e.what();
+	throw;
+    }
+    catch(...)
     {
-        mImpl->mLocatorTopic->serviceUnregistered(mImpl->mStateItem->guid);
+        lg(Error) << BOOST_CURRENT_FUNCTION << " : " << "Unknown exception.";
+	throw;
     }
 }
 
diff --git a/test/TestComparatorBlocking.cpp b/test/TestComparatorBlocking.cpp
index c10b0da..c8cc599 100644
--- a/test/TestComparatorBlocking.cpp
+++ b/test/TestComparatorBlocking.cpp
@@ -207,6 +207,7 @@ BOOST_AUTO_TEST_CASE(testNonBlocking)
 
     ServiceLocatorParamsPtr dne = new ServiceLocatorParams();
     dne->category = "dne";
+    dne->service = "dne.com";
 
     try
     {
@@ -226,6 +227,7 @@ BOOST_AUTO_TEST_CASE(testBlocking)
     // try to locate something else while blocker is blocking
     ServiceLocatorParamsPtr dne = new ServiceLocatorParams();
     dne->category = "dne";
+    dne->service = "dne.com";
 
     BlockingCallbackPtr callback = new BlockingCallback();
 
diff --git a/test/TestServiceLocator.cpp b/test/TestServiceLocator.cpp
index 8016b04..d9d6ef4 100644
--- a/test/TestServiceLocator.cpp
+++ b/test/TestServiceLocator.cpp
@@ -91,17 +91,18 @@ public:
     ServiceLocatorParamsComparePrx foundCompare;
 
     /* Common implementation for locating a service */
-    bool findService(const string& category)
+    bool findService(const string& category, const string& service)
     {
         bool found = true;
 
         try
         {
-            /* Setup our parameters, for now we are simply using test as the category */
+            // Setup our parameters.
             ServiceLocatorParamsPtr params = new ServiceLocatorParams;
             params->category = category;
+            params->service = service;
 
-            /* Actually do the locate request */
+            // Actually do the locate request 
             foundCompare = ServiceLocatorParamsComparePrx::uncheckedCast(discovery->locate(params));
 
             /* If we get here we didn't get an exception back telling us no service found... which is wrong! */
@@ -121,7 +122,7 @@ public:
     }
 
     /* Common implementation for finding multiple services */
-    bool findServices(const string& category, unsigned int expectedNumOfResults)
+    bool findServices(const string& category, const string& service, unsigned int expectedNumOfResults)
     {
         bool found = true;
 
@@ -129,6 +130,7 @@ public:
         {
             ServiceLocatorParamsPtr params = new ServiceLocatorParams;
             params->category = category;
+            params->service = service;
 
             Ice::ObjectProxySeq services = discovery->locateAll(params);
 
@@ -241,7 +243,7 @@ BOOST_GLOBAL_FIXTURE(GlobalIceFixture);
  */
 BOOST_AUTO_TEST_CASE(ServiceNotFoundBeforeAdd)
 {
-    bool found = testbed.findService("test");
+    bool found = testbed.findService("test", "default");
 
     BOOST_CHECK(!found);
 }
@@ -251,7 +253,7 @@ BOOST_AUTO_TEST_CASE(ServiceNotFoundBeforeAdd)
  */
 BOOST_AUTO_TEST_CASE(ServicesNotFoundBeforeAdd)
 {
-    bool found = testbed.findServices("test", 1);
+    bool found = testbed.findServices("test", "default", 1);
 
     BOOST_CHECK(!found);
 }
@@ -289,7 +291,7 @@ BOOST_AUTO_TEST_CASE(AddService)
  */
 BOOST_AUTO_TEST_CASE(ServiceNotFoundAfterAdd)
 {
-    bool found = testbed.findService("test");
+    bool found = testbed.findService("test", "default");
 
     BOOST_CHECK(!found);
 }
@@ -299,7 +301,7 @@ BOOST_AUTO_TEST_CASE(ServiceNotFoundAfterAdd)
  */
 BOOST_AUTO_TEST_CASE(ServicesNotFoundAfterAdd)
 {
-    bool found = testbed.findServices("test", 0);
+    bool found = testbed.findServices("test", "default", 0);
 
     BOOST_CHECK(!found);
 }
@@ -315,6 +317,7 @@ BOOST_AUTO_TEST_CASE(AddLocatorParamsWithoutCompareService)
     {
         ServiceLocatorParamsPtr params = new ServiceLocatorParams;
         params->category = "test";
+        params->service = "default";
 
         testbed.compareManagement->addLocatorParams(params, "");
 
@@ -337,7 +340,7 @@ BOOST_AUTO_TEST_CASE(AddLocatorParamsWithoutCompareService)
  */
 BOOST_AUTO_TEST_CASE(FindServiceWithoutCompareService)
 {
-    bool found = testbed.findService("test");
+    bool found = testbed.findService("test", "default");
 
     BOOST_CHECK(found);
 }
@@ -347,7 +350,7 @@ BOOST_AUTO_TEST_CASE(FindServiceWithoutCompareService)
  */
 BOOST_AUTO_TEST_CASE(FindServicesWithoutCompareService)
 {
-    bool found = testbed.findServices("test", 1);
+    bool found = testbed.findServices("test", "default", 1);
 
     BOOST_CHECK(found);
 }
@@ -448,6 +451,7 @@ BOOST_AUTO_TEST_CASE(AddLocatorParamsWithCompareService)
     {
         ServiceLocatorParamsPtr params = new ServiceLocatorParams;
         params->category = "test2";
+        params->service = "default";
 
         testbed.compareManagement->addLocatorParams(params, "testcompare");
 
@@ -470,7 +474,7 @@ BOOST_AUTO_TEST_CASE(AddLocatorParamsWithCompareService)
  */
 BOOST_AUTO_TEST_CASE(FindServiceWithCompareService)
 {
-    bool found = testbed.findService("test2");
+    bool found = testbed.findService("test2", "default");
 
     BOOST_CHECK(found);
 }
@@ -513,10 +517,11 @@ BOOST_AUTO_TEST_CASE(FindMultipleServices)
     ServiceManagementPrx compareManagement = testbed.management->addService(testbed.compare, "testcompare2");
 
     params->category = "test";
+    params->service = "default";
 
     compareManagement->addLocatorParams(params, "");
 
-    bool found = testbed.findServices("test", 2);
+    bool found = testbed.findServices("test", "", 2);
 
     compareManagement->unregister();
 
@@ -535,7 +540,7 @@ BOOST_AUTO_TEST_CASE(FindMultipleServicesUsingEmptyCategory)
 
     compareManagement->addLocatorParams(params, "");
 
-    bool found = testbed.findServices("", 2);
+    bool found = testbed.findServices("", "", 2);
 
     compareManagement->unregister();
 
@@ -571,7 +576,7 @@ BOOST_AUTO_TEST_CASE(ServiceSuspend)
  */
 BOOST_AUTO_TEST_CASE(FindServiceAfterSuspend)
 {
-    bool found = testbed.findService("test");
+    bool found = testbed.findService("test", "default");
 
     BOOST_CHECK(!found);
 }
@@ -605,7 +610,7 @@ BOOST_AUTO_TEST_CASE(ServiceUnsuspend)
  */
 BOOST_AUTO_TEST_CASE(FindServiceAfterUnsuspend)
 {
-    bool found = testbed.findService("test");
+    bool found = testbed.findService("test", "default");
 
     BOOST_CHECK(found);
 }
@@ -696,7 +701,7 @@ BOOST_AUTO_TEST_CASE(RemoveAlreadyRemovedCompareService)
  */
 BOOST_AUTO_TEST_CASE(FindServiceAfterCompareServiceRemoved)
 {
-    bool found = testbed.findService("test2");
+    bool found = testbed.findService("test2", "default");
 
     BOOST_CHECK(!found);
 }
@@ -730,7 +735,7 @@ BOOST_AUTO_TEST_CASE(ServiceUnregister)
  */
 BOOST_AUTO_TEST_CASE(FindServiceAfterUnregister)
 {
-    bool found = testbed.findService("test");
+    bool found = testbed.findService("test", "default");
 
     BOOST_CHECK(!found);
 }

commit 8f135cc47b45a9b3099b5a71c6c2a05b0a3b4836
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Thu Jun 23 15:15:59 2011 -0500

    Remove local copies of CollocatedIceStorm.
    
    The CollocatedIceStorm facilities are now available from ice-util-cpp, so
    there is no need for a copy in this repository.

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index e57bafc..cfd57d9 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -6,8 +6,6 @@ astscf_component_add_slices(service_locator PROJECT AsteriskSCF/Replication/Serv
 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 CollocatedIceStorm.cpp)
-astscf_component_add_files(service_locator CollocatedIceStorm.h)
 astscf_component_add_files(service_locator ServiceManagement.h)
 astscf_component_add_files(service_locator ServiceLocatorManagement.h)
 astscf_component_add_files(service_locator ServiceLocatorStateReplicator.h)
@@ -15,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)
+target_link_libraries(service_locator logging-client astscf-ice-util-cpp)
 astscf_component_install(service_locator)
 
 astscf_component_init(ServiceLocatorStateReplicator)
diff --git a/src/CollocatedIceStorm.cpp b/src/CollocatedIceStorm.cpp
deleted file mode 100644
index 54c05fc..0000000
--- a/src/CollocatedIceStorm.cpp
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Asterisk SCF -- An open-source communications framework.
- *
- * Copyright (C) 2010, Digium, Inc.
- *
- * See http://www.asterisk.org for more information about
- * the Asterisk SCF project. Please do not directly contact
- * any of the maintainers of this project for assistance;
- * the project provides a web site, mailing lists and IRC
- * channels for your use.
- *
- * This program is free software, distributed under the terms of
- * the GNU General Public License Version 2. See the LICENSE.txt file
- * at the top of the source tree.
- */
-#include <Ice/Ice.h>
-#include <IceStorm/IceStorm.h>
-#include <assert.h>
-#include <algorithm>
-#include "CollocatedIceStorm.h"
-
-using namespace AsteriskSCF::ServiceDiscovery;
-
-//
-// The idea behind this class is that it needs to access the entry point that IceBox would
-// have used and then invoke the methods that are needed to start and stop the IceStorm
-// service.
-//
-typedef IceBox::Service* (*FACTORY)(Ice::CommunicatorPtr);
-
-CollocatedIceStorm::CollocatedIceStorm(const std::string& namePrefix, const Ice::PropertiesPtr& properties) :
-    mStopped(false)
-{
-    //
-    // We create our own communicator to avoid issues with call order on shutdown.
-    //
-    Ice::InitializationData initData;
-    initData.properties = properties;
-    mCommunicator = Ice::initialize(initData);
-
-    std::string loadString = mCommunicator->getProperties()->getPropertyWithDefault("IceStorm.EntryPoint", "IceStormService:createIceStorm");
-
-    mLibrary = new IceUtilInternal::DynamicLibrary;
-    IceUtilInternal::DynamicLibrary::symbol_type entry = mLibrary->loadEntryPoint(loadString);
-    if(entry == 0)
-    {
-        throw mLibrary->getErrorMessage();
-    }
-    FACTORY factory = (FACTORY)entry;
-    mService = factory(mCommunicator);
-    assert(mService != 0);
-    Ice::StringSeq options;
-    mService->start(namePrefix, mCommunicator, options);
-}
-
-CollocatedIceStorm::~CollocatedIceStorm()
-{
-    if(!mStopped)
-    {
-        try
-        {
-            stop();
-            mCommunicator->destroy();
-        }
-        catch(...)
-        {
-        }
-    }
-}
-
-void CollocatedIceStorm::stop()
-{
-    //
-    // NOTE: there isn't any mutex protection here. It can be added later if needed, but at the moment multiple threads
-    // do not have access to this object instance.
-    //
-    if(!mStopped)
-    {
-        if(mService)
-        {
-            mService->stop();
-        }
-        mCommunicator->shutdown();
-        mCommunicator->waitForShutdown();
-        mStopped = true;
-    }
-}
diff --git a/src/CollocatedIceStorm.h b/src/CollocatedIceStorm.h
deleted file mode 100644
index fb598ae..0000000
--- a/src/CollocatedIceStorm.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Asterisk SCF -- An open-source communications framework.
- *
- * Copyright (C) 2010, Digium, Inc.
- *
- * See http://www.asterisk.org for more information about
- * the Asterisk SCF project. Please do not directly contact
- * any of the maintainers of this project for assistance;
- * the project provides a web site, mailing lists and IRC
- * channels for your use.
- *
- * This program is free software, distributed under the terms of
- * the GNU General Public License Version 2. See the LICENSE.txt file
- * at the top of the source tree.
- */
-#pragma once
-
-#include <IceUtil/DynamicLibrary.h>
-#include <Ice/Service.h>
-#include <IceBox/IceBox.h>
-#include <Ice/Ice.h>
-#include <IceStorm/IceStorm.h>
-#include <string>
-
-namespace AsteriskSCF
-{
-namespace ServiceDiscovery
-{
-/**
- * A helper class that instantiates IceStorm in-process, removing the need to launch
- * a separate process to access IceStorm services.
- */
-
-class CollocatedIceStorm : public IceUtil::Shared
-{
-public:
-    CollocatedIceStorm(const std::string&, const Ice::PropertiesPtr&);
-    ~CollocatedIceStorm();
-
-    /**
-     * "nice" applications should explictly call stop !
-     */
-    void stop();
-
-private:
-    IceUtilInternal::DynamicLibraryPtr mLibrary;
-    IceBox::ServicePtr mService;
-    Ice::CommunicatorPtr mCommunicator;
-    bool mStopped;
-};
-
-typedef IceUtil::Handle<CollocatedIceStorm> CollocatedIceStormPtr;
-
-} /* end of ServiceDiscovery */
-} /* end of AsteriskSCF */
-
diff --git a/src/ServiceLocator.cpp b/src/ServiceLocator.cpp
index ab3bb0d..34fe063 100644
--- a/src/ServiceLocator.cpp
+++ b/src/ServiceLocator.cpp
@@ -23,11 +23,11 @@
 #include <AsteriskSCF/logger.h>
 #include <AsteriskSCF/Logger/IceLogger.h>
 #include <AsteriskSCF/System/Component/ReplicaIf.h>
+#include <AsteriskSCF/CollocatedIceStorm/CollocatedIceStorm.h>
 
 #include "ServiceLocatorManagement.h"
 #include "ServiceManagement.h"
 #include "ServiceLocatorStateReplicator.h"
-#include "CollocatedIceStorm.h"
 
 using namespace std;
 using namespace AsteriskSCF::System::Discovery;
@@ -58,7 +58,7 @@ private:
     Ice::ObjectAdapterPtr mLocalAdapter;
     Ice::ObjectAdapterPtr mDiscoveryAdapter;
     Ice::ObjectAdapterPtr mManagementAdapter;
-    AsteriskSCF::ServiceDiscovery::CollocatedIceStormPtr mIceStorm;
+    AsteriskSCF::CollocatedIceStorm::CollocatedIceStormPtr mIceStorm;
     ReplicaPtr mReplicaService;
     ServiceLocatorStateReplicatorPrx mStateReplicator;
 };
@@ -168,9 +168,9 @@ void ServiceLocatorImpl::locateAll_async(const AMD_ServiceLocator_locateAllPtr&
 void ServiceLocatorApp::start(const string&, const Ice::CommunicatorPtr& communicator,
     const Ice::StringSeq&)
 {
-    mIceStorm = new AsteriskSCF::ServiceDiscovery::CollocatedIceStorm("AsteriskSCFIceStorm", communicator->getProperties());
+    mIceStorm = new AsteriskSCF::CollocatedIceStorm::CollocatedIceStorm("AsteriskSCFIceStorm", communicator->getProperties());
 
-	mLocalAdapter = communicator->createObjectAdapter("ServiceLocatorLocalAdapter");
+    mLocalAdapter = communicator->createObjectAdapter("ServiceLocatorLocalAdapter");
 
     ConfiguredIceLoggerPtr mIceLogger = createIceLogger(mLocalAdapter);
 

commit 319c1b4439acfb3f28e524da673c4b434e3e78ee
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Wed Jun 15 16:55:31 2011 -0500

    Provide 'astscf' prefix for linking to ice-util-cpp library.

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 0463db9..e57bafc 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,4 +1,4 @@
-include_directories(${ice-util-cpp_dir}/include)
+include_directories(${astscf-ice-util-cpp_dir}/include)
 include_directories(${logger_dir}/include)
 
 astscf_component_init(service_locator)

commit 48009bb4fd430cc800b6a24e4917d9a73b83fa36
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Wed Jun 15 16:40:16 2011 -0500

    Install component-specific Slice files.
    
    Use astscf_slice_collection_install() to install the Slice files provided
    by each component, that define its interfaces. As part of this change, many
    of these Slice files were renamed and moved into different namespaces, to
    provide consistency.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index f12d74d..0ca4b77 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,3 +4,4 @@ add_subdirectory(src)
 if(BUILD_TESTING)
   add_subdirectory(test)
 endif()
+astscf_slice_collection_install(PROJECT)
diff --git a/slice/ServiceLocatorStateReplicationIf.ice b/slice/AsteriskSCF/Replication/ServiceLocator/ServiceLocatorStateReplicationIf.ice
similarity index 86%
rename from slice/ServiceLocatorStateReplicationIf.ice
rename to slice/AsteriskSCF/Replication/ServiceLocator/ServiceLocatorStateReplicationIf.ice
index c0fc4e2..3ec0dd1 100644
--- a/slice/ServiceLocatorStateReplicationIf.ice
+++ b/slice/AsteriskSCF/Replication/ServiceLocator/ServiceLocatorStateReplicationIf.ice
@@ -23,10 +23,10 @@
 module AsteriskSCF
 {
 
-module Core
+module Replication
 {
 
-module Discovery
+module ServiceLocator
 {
 
 ["suppress"]
@@ -66,20 +66,20 @@ module V1
    class ServiceLocatorParamsStateItem extends ServiceLocatorStateItem
    {
        string serviceKey;
-       ServiceLocatorParams params;
+       AsteriskSCF::Core::Discovery::V1::ServiceLocatorParams params;
        string compareGuid;
    };
 
    class ServiceLocatorComparatorStateItem extends ServiceLocatorStateItem
    {
        string name;
-       ServiceLocatorParamsCompare *comparator;
+       AsteriskSCF::Core::Discovery::V1::ServiceLocatorParamsCompare *comparator;
    };
 
-}; //module V1
+}; /* module V1 */
 
-}; //module Discovery
+}; /* module ServiceLocator */
 
-}; //module Core
+}; /* module Replication */
 
-}; //module Asterisk SCF
+}; /* module AsteriskSCF */
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index f852f54..0463db9 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -2,7 +2,7 @@ include_directories(${ice-util-cpp_dir}/include)
 include_directories(${logger_dir}/include)
 
 astscf_component_init(service_locator)
-astscf_component_add_slices(service_locator PROJECT ServiceLocatorStateReplicationIf.ice)
+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)
@@ -19,7 +19,7 @@ target_link_libraries(service_locator logging-client)
 astscf_component_install(service_locator)
 
 astscf_component_init(ServiceLocatorStateReplicator)
-astscf_component_add_slices(ServiceLocatorStateReplicator PROJECT ServiceLocatorStateReplicationIf.ice)
+astscf_component_add_slices(ServiceLocatorStateReplicator PROJECT AsteriskSCF/Replication/ServiceLocator/ServiceLocatorStateReplicationIf.ice)
 astscf_component_add_files(ServiceLocatorStateReplicator ServiceLocatorStateReplicatorApp.cpp)
 astscf_component_add_files(ServiceLocatorStateReplicator ServiceLocatorStateReplicator.h)
 astscf_component_add_ice_libraries(ServiceLocatorStateReplicator IceStorm)
diff --git a/src/ServiceLocator.cpp b/src/ServiceLocator.cpp
index f075227..ab3bb0d 100644
--- a/src/ServiceLocator.cpp
+++ b/src/ServiceLocator.cpp
@@ -33,6 +33,7 @@ using namespace std;
 using namespace AsteriskSCF::System::Discovery;
 using namespace AsteriskSCF::System::Logging;
 using namespace AsteriskSCF::Core::Discovery::V1;
+using namespace AsteriskSCF::Replication::ServiceLocator::V1;
 using namespace AsteriskSCF::ServiceDiscovery;
 using namespace AsteriskSCF::System::Component::V1;
 
diff --git a/src/ServiceLocatorManagement.cpp b/src/ServiceLocatorManagement.cpp
index b1cfe2a..28168cd 100644
--- a/src/ServiceLocatorManagement.cpp
+++ b/src/ServiceLocatorManagement.cpp
@@ -34,6 +34,7 @@ using namespace std;
 using namespace AsteriskSCF::System::Discovery;
 using namespace AsteriskSCF::System::Logging;
 using namespace AsteriskSCF::Core::Discovery::V1;
+using namespace AsteriskSCF::Replication::ServiceLocator::V1;
 using namespace AsteriskSCF::ServiceDiscovery;
 using namespace AsteriskSCF;
 
@@ -585,7 +586,7 @@ void ServiceLocatorManagementImpl::removeService(
 /**
  * Function which replicates state items.
  */
-void ServiceLocatorManagementImpl::replicateState(const AsteriskSCF::Core::Discovery::V1::ServiceLocatorStateItemPtr& item)
+void ServiceLocatorManagementImpl::replicateState(const ServiceLocatorStateItemPtr& item)
 {
 	if (!item)
 	{
@@ -615,7 +616,7 @@ void ServiceLocatorManagementImpl::replicateState(const AsteriskSCF::Core::Disco
 /**
  * Function which removes state items from the replicator.
  */
-void ServiceLocatorManagementImpl::removeState(const AsteriskSCF::Core::Discovery::V1::ServiceLocatorStateItemPtr& item)
+void ServiceLocatorManagementImpl::removeState(const ServiceLocatorStateItemPtr& item)
 {
 	if (!item)
 	{
diff --git a/src/ServiceLocatorManagement.h b/src/ServiceLocatorManagement.h
index 2251ad5..468565f 100644
--- a/src/ServiceLocatorManagement.h
+++ b/src/ServiceLocatorManagement.h
@@ -79,9 +79,9 @@ public:
     // Replication related functions.
     ServiceManagementImplPtr addService(const Ice::ObjectPrx&, const std::string&, const
         Ice::Identity&);
-    void replicateState(const AsteriskSCF::Core::Discovery::V1::ServiceLocatorStateItemPtr&);
-    void removeState(const AsteriskSCF::Core::Discovery::V1::ServiceLocatorStateItemPtr&);	
-    void setStateReplicator(AsteriskSCF::Core::Discovery::V1::ServiceLocatorStateReplicatorPrx);
+    void replicateState(const AsteriskSCF::Replication::ServiceLocator::V1::ServiceLocatorStateItemPtr&);
+    void removeState(const AsteriskSCF::Replication::ServiceLocator::V1::ServiceLocatorStateItemPtr&);	
+    void setStateReplicator(AsteriskSCF::Replication::ServiceLocator::V1::ServiceLocatorStateReplicatorPrx);
 
     //
     // AsteriskSCF::Core::Discovery::V1::ServiceLocatorManagement interface.
diff --git a/src/ServiceLocatorStateListener.cpp b/src/ServiceLocatorStateListener.cpp
index b5f9733..a549e3b 100644
--- a/src/ServiceLocatorStateListener.cpp
+++ b/src/ServiceLocatorStateListener.cpp
@@ -31,6 +31,7 @@
 #include "ServiceLocatorStateReplicator.h"
 
 using namespace AsteriskSCF::Core::Discovery::V1;
+using namespace AsteriskSCF::Replication::ServiceLocator::V1;
 using namespace AsteriskSCF::ServiceDiscovery;
 
 class ServiceLocatorStateReplicatorItem
diff --git a/src/ServiceLocatorStateReplicator.h b/src/ServiceLocatorStateReplicator.h
index cb102d3..8b64b67 100644
--- a/src/ServiceLocatorStateReplicator.h
+++ b/src/ServiceLocatorStateReplicator.h
@@ -29,20 +29,20 @@
 struct ServiceLocatorStateReplicatorListenerImpl;
 
 typedef AsteriskSCF::Replication::StateReplicator<
-        AsteriskSCF::Core::Discovery::V1::ServiceLocatorStateReplicator, 
-        AsteriskSCF::Core::Discovery::V1::ServiceLocatorStateItemPtr, 
+        AsteriskSCF::Replication::ServiceLocator::V1::ServiceLocatorStateReplicator, 
+        AsteriskSCF::Replication::ServiceLocator::V1::ServiceLocatorStateItemPtr, 
         std::string, 
-        AsteriskSCF::Core::Discovery::V1::ServiceLocatorStateReplicatorListenerPrx> 
+        AsteriskSCF::Replication::ServiceLocator::V1::ServiceLocatorStateReplicatorListenerPrx> 
             ServiceLocatorStateReplicatorI;
 typedef IceUtil::Handle<ServiceLocatorStateReplicatorI> ServiceLocatorStateReplicatorIPtr;
 
 class ServiceLocatorStateReplicatorListenerI : 
-    public AsteriskSCF::Core::Discovery::V1::ServiceLocatorStateReplicatorListener
+    public AsteriskSCF::Replication::ServiceLocator::V1::ServiceLocatorStateReplicatorListener
 {
 public:
     ServiceLocatorStateReplicatorListenerI(const AsteriskSCF::ServiceDiscovery::ServiceLocatorManagementImplPtr&);
     void stateRemoved(const Ice::StringSeq&, const Ice::Current&);
-    void stateSet(const AsteriskSCF::Core::Discovery::V1::ServiceLocatorStateItemSeq&, const Ice::Current&);
+    void stateSet(const AsteriskSCF::Replication::ServiceLocator::V1::ServiceLocatorStateItemSeq&, const Ice::Current&);
     bool operator==(const ServiceLocatorStateReplicatorListenerI& rhs);
 private:
     boost::shared_ptr<ServiceLocatorStateReplicatorListenerImpl> mImpl;
diff --git a/src/ServiceManagement.cpp b/src/ServiceManagement.cpp
index 3406157..00397f1 100644
--- a/src/ServiceManagement.cpp
+++ b/src/ServiceManagement.cpp
@@ -33,6 +33,7 @@
 
 using namespace std;
 using namespace AsteriskSCF::Core::Discovery::V1;
+using namespace AsteriskSCF::Replication::ServiceLocator::V1;
 using namespace AsteriskSCF::ServiceDiscovery;
 using namespace AsteriskSCF::System::Logging;
 using namespace AsteriskSCF;

commit 9e1c696302da2ca71ebf9e9179de942eface5289
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Tue Jun 14 17:24:31 2011 -0500

    Use Slice collections support in AsteriskSCF.cmake.

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index a342ae1..f852f54 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,4 +1,3 @@
-include_directories(${API_INCLUDE_DIR})
 include_directories(${ice-util-cpp_dir}/include)
 include_directories(${logger_dir}/include)
 
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index be6e6a9..d5cf790 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -1,12 +1,10 @@
-include_directories(${API_INCLUDE_DIR})
-
 astscf_component_init(service_locator_test)
 astscf_component_add_files(service_locator_test TestServiceLocator.cpp)
 astscf_component_add_files(service_locator_test TestComparatorBlocking.cpp)
 astscf_component_add_ice_libraries(service_locator_test IceStorm)
 astscf_component_add_boost_libraries(service_locator_test unit_test_framework thread date_time)
+astscf_component_add_slice_collection_libraries(service_locator_test ASTSCF)
 astscf_component_build_icebox(service_locator_test)
-target_link_libraries(service_locator_test astscf-api)
 astscf_test_icebox(service_locator_test config/test_component.config)
 
 file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/AsteriskSCFIceStorm)

commit 99ce1d4026d48638a394eaa147639b5f8f1cdef1
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Mon Jun 6 18:50:26 2011 -0500

    Slice collections, and consistency of naming in various places.
    
    * Support Slice file 'collections'.
    
    * Make all Slice directories in repositories be called 'slice' and at the
      top level in the repository, so the automatic 'PROJECT' collection will
      be generated for them.
    
    * Build ice-util-cpp and util-cpp as single libraries.
    
    * Enable building and execution of ice-util-cpp top-level unit tests.
    
    Conflicts:
    
    	cmake/example/CMakeLists.txt

diff --git a/local-slice/ServiceLocatorStateReplicationIf.ice b/slice/ServiceLocatorStateReplicationIf.ice
similarity index 100%
rename from local-slice/ServiceLocatorStateReplicationIf.ice
rename to slice/ServiceLocatorStateReplicationIf.ice
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 20197c9..a342ae1 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -2,30 +2,27 @@ include_directories(${API_INCLUDE_DIR})
 include_directories(${ice-util-cpp_dir}/include)
 include_directories(${logger_dir}/include)
 
-astscf_slice_include_directories(${API_SLICE_DIR})
-
 astscf_component_init(service_locator)
-astscf_component_add_slice(service_locator ../local-slice/ServiceLocatorStateReplicationIf.ice)
-astscf_component_add_file(service_locator ServiceLocator.cpp)
-astscf_component_add_file(service_locator ServiceLocatorManagement.cpp)
-astscf_component_add_file(service_locator ServiceManagement.cpp)
-astscf_component_add_file(service_locator CollocatedIceStorm.cpp)
-astscf_component_add_file(service_locator CollocatedIceStorm.h)
-astscf_component_add_file(service_locator ServiceManagement.h)
-astscf_component_add_file(service_locator ServiceLocatorManagement.h)
-astscf_component_add_file(service_locator ServiceLocatorStateReplicator.h)
-astscf_component_add_file(service_locator ServiceLocatorStateListener.cpp)
+astscf_component_add_slices(service_locator PROJECT 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 CollocatedIceStorm.cpp)
+astscf_component_add_files(service_locator CollocatedIceStorm.h)
+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_ice_libraries(service_locator IceBox)
 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_component_install(service_locator)
 
 astscf_component_init(ServiceLocatorStateReplicator)
-astscf_component_add_slice(ServiceLocatorStateReplicator ../local-slice/ServiceLocatorStateReplicationIf.ice)
-astscf_component_add_file(ServiceLocatorStateReplicator ServiceLocatorStateReplicatorApp.cpp)
-astscf_component_add_file(ServiceLocatorStateReplicator ServiceLocatorStateReplicator.h)
+astscf_component_add_slices(ServiceLocatorStateReplicator PROJECT ServiceLocatorStateReplicationIf.ice)
+astscf_component_add_files(ServiceLocatorStateReplicator ServiceLocatorStateReplicatorApp.cpp)
+astscf_component_add_files(ServiceLocatorStateReplicator ServiceLocatorStateReplicator.h)
 astscf_component_add_ice_libraries(ServiceLocatorStateReplicator IceStorm)
 astscf_component_add_boost_libraries(ServiceLocatorStateReplicator thread date_time)
 astscf_component_build_icebox(ServiceLocatorStateReplicator)
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 2a67a65..be6e6a9 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -1,12 +1,12 @@
 include_directories(${API_INCLUDE_DIR})
 
 astscf_component_init(service_locator_test)
-astscf_component_add_file(service_locator_test TestServiceLocator.cpp)
-astscf_component_add_file(service_locator_test TestComparatorBlocking.cpp)
+astscf_component_add_files(service_locator_test TestServiceLocator.cpp)
+astscf_component_add_files(service_locator_test TestComparatorBlocking.cpp)
 astscf_component_add_ice_libraries(service_locator_test IceStorm)
 astscf_component_add_boost_libraries(service_locator_test unit_test_framework thread date_time)
 astscf_component_build_icebox(service_locator_test)
-target_link_libraries(service_locator_test asterisk-scf-api)
+target_link_libraries(service_locator_test astscf-api)
 astscf_test_icebox(service_locator_test config/test_component.config)
 
 file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/AsteriskSCFIceStorm)

commit 4cba5c90fa6d211279477fd401d204c15d677277
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Fri Jun 3 15:20:33 2011 -0500

    Accommodate change from ASTERISK_SCF_ICEBOX_EXPORT to ASTSCF_DLL_EXPORT.

diff --git a/src/ServiceLocator.cpp b/src/ServiceLocator.cpp
index 59274ab..f075227 100644
--- a/src/ServiceLocator.cpp
+++ b/src/ServiceLocator.cpp
@@ -304,7 +304,7 @@ void ServiceLocatorApp::stop()
 
 extern "C"
 {
-ASTERISK_SCF_ICEBOX_EXPORT IceBox::Service* create(Ice::CommunicatorPtr)
+ASTSCF_DLL_EXPORT IceBox::Service* create(Ice::CommunicatorPtr)
 {
     return new ServiceLocatorApp;
 }
diff --git a/src/ServiceLocatorStateReplicatorApp.cpp b/src/ServiceLocatorStateReplicatorApp.cpp
index cc2aab4..93bd340 100644
--- a/src/ServiceLocatorStateReplicatorApp.cpp
+++ b/src/ServiceLocatorStateReplicatorApp.cpp
@@ -114,7 +114,7 @@ void ServiceLocatorStateReplicatorService::stop()
 
 extern "C"
 {
-ASTERISK_SCF_ICEBOX_EXPORT IceBox::Service* create(Ice::CommunicatorPtr)
+ASTSCF_DLL_EXPORT IceBox::Service* create(Ice::CommunicatorPtr)
 {
     return new ServiceLocatorStateReplicatorService;
 }
diff --git a/test/TestServiceLocator.cpp b/test/TestServiceLocator.cpp
index 85a8cbf..8016b04 100644
--- a/test/TestServiceLocator.cpp
+++ b/test/TestServiceLocator.cpp
@@ -761,7 +761,7 @@ void ServiceLocatorTest::stop()
 
 extern "C"
 {
-ASTERISK_SCF_ICEBOX_EXPORT IceBox::Service* create(Ice::CommunicatorPtr)
+ASTSCF_DLL_EXPORT IceBox::Service* create(Ice::CommunicatorPtr)
 {
     return new ServiceLocatorTest;
 }

commit dd09277c87324c95bb65205dbd727715c0995cef
Author: Kevin P. Fleming <kpfleming at digium.com>
... 23404 lines suppressed ...


-- 
asterisk-scf/integration/servicediscovery.git



More information about the asterisk-scf-commits mailing list