summaryrefslogtreecommitdiff
path: root/cpp/demo/Freeze
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/demo/Freeze')
-rw-r--r--cpp/demo/Freeze/phonebook/Collocated.cpp4
-rw-r--r--cpp/demo/Freeze/phonebook/PhoneBookI.cpp5
-rw-r--r--cpp/demo/Freeze/phonebook/Server.cpp4
3 files changed, 5 insertions, 8 deletions
diff --git a/cpp/demo/Freeze/phonebook/Collocated.cpp b/cpp/demo/Freeze/phonebook/Collocated.cpp
index b02aa8960d7..3e5becb0693 100644
--- a/cpp/demo/Freeze/phonebook/Collocated.cpp
+++ b/cpp/demo/Freeze/phonebook/Collocated.cpp
@@ -70,7 +70,7 @@ PhoneBookCollocated::run(int argc, char* argv[])
// Create an Object Adapter, use the Evictor as Servant Locator.
//
ObjectAdapterPtr adapter = communicator()->createObjectAdapter("PhoneBookAdapter");
- adapter->setServantLocator(evictor);
+ adapter->addServantLocator(evictor, "contact");
//
// Create the phonebook, and add it to the Object Adapter.
@@ -83,7 +83,7 @@ PhoneBookCollocated::run(int argc, char* argv[])
//
ServantFactoryPtr contactFactory = new ContactFactory(phoneBook, evictor);
ServantInitializerPtr contactInitializer = ServantInitializerPtr::dynamicCast(contactFactory);
- communicator()->installServantFactory(contactFactory, "::Contact");
+ communicator()->addServantFactory(contactFactory, "::Contact");
evictor->installServantInitializer(contactInitializer);
//
diff --git a/cpp/demo/Freeze/phonebook/PhoneBookI.cpp b/cpp/demo/Freeze/phonebook/PhoneBookI.cpp
index 69d02daab1b..3a1c70895a4 100644
--- a/cpp/demo/Freeze/phonebook/PhoneBookI.cpp
+++ b/cpp/demo/Freeze/phonebook/PhoneBookI.cpp
@@ -269,8 +269,5 @@ PhoneBookI::getNewIdentity()
ids.push_back(s);
_nameIdentitiesDict->put("ID", ids);
- return string("phonebook.contact#") + s;
+ return string("contact#") + s;
}
-
-
-
diff --git a/cpp/demo/Freeze/phonebook/Server.cpp b/cpp/demo/Freeze/phonebook/Server.cpp
index 48732884f89..ea4c8376d2a 100644
--- a/cpp/demo/Freeze/phonebook/Server.cpp
+++ b/cpp/demo/Freeze/phonebook/Server.cpp
@@ -71,7 +71,7 @@ PhoneBookServer::run(int argc, char* argv[])
// Create an Object Adapter, use the Evictor as Servant Locator.
//
ObjectAdapterPtr adapter = communicator()->createObjectAdapter("PhoneBookAdapter");
- adapter->setServantLocator(evictor);
+ adapter->addServantLocator(evictor, "contact");
//
// Create the phonebook, and add it to the Object Adapter.
@@ -84,7 +84,7 @@ PhoneBookServer::run(int argc, char* argv[])
//
ServantFactoryPtr contactFactory = new ContactFactory(phoneBook, evictor);
ServantInitializerPtr contactInitializer = ServantInitializerPtr::dynamicCast(contactFactory);
- communicator()->installServantFactory(contactFactory, "::Contact");
+ communicator()->addServantFactory(contactFactory, "::Contact");
evictor->installServantInitializer(contactInitializer);
//