[asterisk-scf-commits] asterisk-scf/release/servicediscovery.git branch "master" updated.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Mon Feb 6 17:54:11 CST 2012
branch "master" has been updated
via 260f2778ce9edc2f2bb046daf45720b9996028e4 (commit)
from 7c99739049b99848d3c4e2215f343412f8a3c759 (commit)
Summary of changes:
config/test_component.conf | 2 +-
src/CMakeLists.txt | 2 +-
src/ComponentStateReplicator.cpp | 99 --------------------------------------
test/TestServiceLocator.cpp | 2 +-
4 files changed, 3 insertions(+), 102 deletions(-)
delete mode 100644 src/ComponentStateReplicator.cpp
- Log -----------------------------------------------------------------
commit 260f2778ce9edc2f2bb046daf45720b9996028e4
Author: Ken Hunt <ken.hunt at digium.com>
Date: Mon Feb 6 17:52:02 2012 -0600
Reverted replicator. ServiceLocator doesn't benefit from the base replicator class.
diff --git a/config/test_component.conf b/config/test_component.conf
index 24a5805..7ea0784 100644
--- a/config/test_component.conf
+++ b/config/test_component.conf
@@ -20,7 +20,7 @@ IceBox.LoadOrder=ServiceDiscoveryStateReplicator,ServiceDiscovery,ServiceDiscove
#
# ServiceDiscovery configuration
#
-IceBox.Service.ServiceDiscovery=service_locator:create
+IceBox.Service.ServiceDiscovery=ServiceLocator:create
# Test endpoints for the service locator local adapter
ServiceDiscovery.BackplaneAdapter.Endpoints=tcp -h 127.0.0.1 -p 4410
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 728cf52..85d3f77 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -18,7 +18,7 @@ astscf_component_install(ServiceLocator)
astscf_component_init(ServiceLocatorStateReplicator)
astscf_component_add_slices(ServiceLocatorStateReplicator PROJECT AsteriskSCF/Replication/ServiceLocator/ServiceLocatorStateReplicationIf.ice)
-astscf_component_add_files(ServiceLocatorStateReplicator ComponentStateReplicator.cpp)
+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)
diff --git a/src/ComponentStateReplicator.cpp b/src/ComponentStateReplicator.cpp
deleted file mode 100644
index 75c72ca..0000000
--- a/src/ComponentStateReplicator.cpp
+++ /dev/null
@@ -1,99 +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 <AsteriskSCF/Component/ComponentStateReplicator.h>
-#include <AsteriskSCF/Logger.h>
-#include "ServiceLocatorStateReplicator.h"
-
-using namespace std;
-using namespace AsteriskSCF::Core;
-using namespace AsteriskSCF::Discovery;
-using namespace AsteriskSCF::Core::Discovery::V1;
-using namespace AsteriskSCF::System::Component::V1;
-using namespace AsteriskSCF::System::Logging;
-using namespace AsteriskSCF::Replication::ServiceLocator::V1;
-
-namespace
-{
-Logger lg = getLoggerFactory().getLogger("AsteriskSCF.ServiceLocatorStateReplicator");
-}
-
-class ComponentStateReplicator : public AsteriskSCF::Component::ComponentStateReplicator
-{
-public:
- ComponentStateReplicator() :
- AsteriskSCF::Component::ComponentStateReplicator(lg,
- AsteriskSCF::Replication::ServiceLocator::V1::StateReplicatorComponentCategory,
- false) // if true, supports configuration
- {
- }
-
- ~ComponentStateReplicator() {};
-
- ///////////////////////////////////////////////////
- // Required overrides
-
- void createPrimaryServices();
- void preparePrimaryServicesForDiscovery();
-
-private:
- ServiceLocatorStateReplicatorIPtr mStateReplicator;
- ServiceLocatorStateReplicatorPrx mStateReplicatorPrx;
- LocatorRegistrationWrapperPtr mStateReplicatorRegistration;
-};
-
-static const string ServiceDiscoveryId("ServiceLocatorStateReplicatorService");
-
-/**
- * Register this component's primary public interfaces with the Service Locator.
- * This enables other Asterisk SCF components to locate our interfaces.
- */
-void ComponentStateReplicator::preparePrimaryServicesForDiscovery()
-{
- try
- {
- // Wrap our authentication extensions point for the Service Locator.
- mStateReplicatorRegistration = wrapServiceForRegistration(mStateReplicatorPrx,
- AsteriskSCF::Replication::ServiceLocator::V1::StateReplicatorDiscoveryCategory);
- managePrimaryService(mStateReplicatorRegistration);
- }
- catch(const std::exception& e)
- {
- lg(Error) << "Unable to publish component interfaces in " << getName() << BOOST_CURRENT_FUNCTION <<
- ". Exception: " << e.what();
- throw; // rethrow
- }
-}
-
-void ComponentStateReplicator::createPrimaryServices()
-{
- // Create the state replicator servant
- mStateReplicator = new ServiceLocatorStateReplicatorI();
-
- mStateReplicatorPrx = ServiceLocatorStateReplicatorPrx::uncheckedCast(
- getServiceAdapter()->add(mStateReplicator, getCommunicator()->stringToIdentity(ServiceDiscoveryId)));
-}
-
-extern "C"
-{
-ASTSCF_DLL_EXPORT IceBox::Service* create(Ice::CommunicatorPtr)
-{
- return new ComponentStateReplicator;
-}
-}
-
diff --git a/test/TestServiceLocator.cpp b/test/TestServiceLocator.cpp
index c39619d..ebdae5d 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()
-----------------------------------------------------------------------
--
asterisk-scf/release/servicediscovery.git
More information about the asterisk-scf-commits
mailing list