summaryrefslogtreecommitdiff
path: root/cpp/src/IceBox/Server.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2002-04-01 20:41:28 +0000
committerMark Spruiell <mes@zeroc.com>2002-04-01 20:41:28 +0000
commitf5452c64777343b5b854629f600e1734ef6f9008 (patch)
treee4a76b4a6214ad9544470031848405acd0bc4197 /cpp/src/IceBox/Server.cpp
parentadding IceBox (diff)
downloadice-f5452c64777343b5b854629f600e1734ef6f9008.tar.bz2
ice-f5452c64777343b5b854629f600e1734ef6f9008.tar.xz
ice-f5452c64777343b5b854629f600e1734ef6f9008.zip
initial check-in
Diffstat (limited to 'cpp/src/IceBox/Server.cpp')
-rw-r--r--cpp/src/IceBox/Server.cpp54
1 files changed, 54 insertions, 0 deletions
diff --git a/cpp/src/IceBox/Server.cpp b/cpp/src/IceBox/Server.cpp
new file mode 100644
index 00000000000..13c18d746df
--- /dev/null
+++ b/cpp/src/IceBox/Server.cpp
@@ -0,0 +1,54 @@
+// **********************************************************************
+//
+// Copyright (c) 2002
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#include <Ice/Ice.h>
+#include <IceBox/ServiceManagerI.h>
+
+using namespace std;
+using namespace Ice;
+using namespace IceBox;
+
+int
+main(int argc, char* argv[])
+{
+ CommunicatorPtr communicator;
+ ServiceManagerPtr serviceManager;
+ int status;
+
+ addArgumentPrefix("IceBox");
+
+ try
+ {
+ communicator = initialize(argc, argv);
+ ServiceManagerI* serviceManagerImpl = new ServiceManagerI(communicator);
+ serviceManager = serviceManagerImpl;
+ status = serviceManagerImpl->run(argc, argv);
+ }
+ catch (const Exception& ex)
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
+
+ if (communicator)
+ {
+ try
+ {
+ communicator->destroy();
+ }
+ catch (const Exception& ex)
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
+ }
+
+ return status;
+}