diff options
author | Mark Spruiell <mes@zeroc.com> | 2010-01-05 20:17:33 -0800 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2010-01-05 20:17:33 -0800 |
commit | cf24e681e8c52cd20d81fe750ff258e67ee65734 (patch) | |
tree | 8411820ce3a257272d6ffa0d3dcdab9ce106609a /cpp/demo/book/map_filesystem/Server.cpp | |
parent | Fixed bug 4576 - add NPTL options only on Rhel4 (diff) | |
download | ice-cf24e681e8c52cd20d81fe750ff258e67ee65734.tar.bz2 ice-cf24e681e8c52cd20d81fe750ff258e67ee65734.tar.xz ice-cf24e681e8c52cd20d81fe750ff258e67ee65734.zip |
bug 4495 - clean up book demos
Diffstat (limited to 'cpp/demo/book/map_filesystem/Server.cpp')
-rw-r--r-- | cpp/demo/book/map_filesystem/Server.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cpp/demo/book/map_filesystem/Server.cpp b/cpp/demo/book/map_filesystem/Server.cpp index 2897afc6458..76d2cd30168 100644 --- a/cpp/demo/book/map_filesystem/Server.cpp +++ b/cpp/demo/book/map_filesystem/Server.cpp @@ -28,14 +28,17 @@ public: virtual int run(int, char*[]) { + // // Terminate cleanly on receipt of a signal // shutdownOnInterrupt(); + // // Create an object adapter // Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("MapFilesystem"); + // // Open a connection to the files and directories database. This should remain open // for the duration of the application for performance reasons. // @@ -43,19 +46,23 @@ public: const IdentityFileEntryMap fileDB(connection, FileI::filesDB()); const IdentityDirectoryEntryMap dirDB(connection, DirectoryI::directoriesDB()); + // // Add default servants for the file and directory. // adapter->addDefaultServant(new FileI(communicator(), _envName), "file"); adapter->addDefaultServant(new DirectoryI(communicator(), _envName), ""); + // // Ready to accept requests now // adapter->activate(); + // // Wait until we are done // communicator()->waitForShutdown(); + // // Clean up // if(interrupted()) |