diff options
author | Bernard Normier <bernard@zeroc.com> | 2005-04-06 15:30:13 +0000 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2005-04-06 15:30:13 +0000 |
commit | fa9e5790a29705d41b5525fb0bd9af50603b1132 (patch) | |
tree | 18982ec1d30c37b7cd5c8c8f52854a592fe8cda3 /cpp/demo/Freeze/phonebook/Collocated.cpp | |
parent | Removed specialized loggers (diff) | |
download | ice-fa9e5790a29705d41b5525fb0bd9af50603b1132.tar.bz2 ice-fa9e5790a29705d41b5525fb0bd9af50603b1132.tar.xz ice-fa9e5790a29705d41b5525fb0bd9af50603b1132.zip |
Merged fix from 2.1 branch
Diffstat (limited to 'cpp/demo/Freeze/phonebook/Collocated.cpp')
-rw-r--r-- | cpp/demo/Freeze/phonebook/Collocated.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/cpp/demo/Freeze/phonebook/Collocated.cpp b/cpp/demo/Freeze/phonebook/Collocated.cpp index 5542c3cbd31..60aed9975cd 100644 --- a/cpp/demo/Freeze/phonebook/Collocated.cpp +++ b/cpp/demo/Freeze/phonebook/Collocated.cpp @@ -64,6 +64,11 @@ PhoneBookCollocated::run(int argc, char* argv[]) // // Create an evictor for contacts. + // When Freeze.Evictor.db.contacts.PopulateEmptyIndices is not 0 and the + // Name index is empty, Freeze will traverse the database to recreate + // the index during createEvictor(). Therefore the factories for the objects + // stored in evictor (contacts here) must be registered before the call + // to createEvictor(). // Freeze::EvictorPtr evictor = Freeze::createEvictor(adapter, _envName, "contacts", 0, indices); adapter->addServantLocator(evictor, "contact"); @@ -73,6 +78,12 @@ PhoneBookCollocated::run(int argc, char* argv[]) { evictor->setSize(evictorSize); } + + // + // Completes the initialization of the contact factory. Note that ContactI/ + // ContactFactoryI uses this evictor only when a Contact is destroyed, + // which cannot happen during createEvictor(). + // contactFactory->setEvictor(evictor); // |