diff options
author | Mark Spruiell <mes@zeroc.com> | 2002-04-02 22:44:49 +0000 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2002-04-02 22:44:49 +0000 |
commit | 7e6e7d8d59765b2940e56fc6dbac00daa0a57e43 (patch) | |
tree | 009c2c221c1a504a10c98b946fa55aa62286f113 /java/src/IceBox/Server.java | |
parent | IceBox::PrintServicesReady support added (diff) | |
download | ice-7e6e7d8d59765b2940e56fc6dbac00daa0a57e43.tar.bz2 ice-7e6e7d8d59765b2940e56fc6dbac00daa0a57e43.tar.xz ice-7e6e7d8d59765b2940e56fc6dbac00daa0a57e43.zip |
adding IceBox
Diffstat (limited to 'java/src/IceBox/Server.java')
-rw-r--r-- | java/src/IceBox/Server.java | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/java/src/IceBox/Server.java b/java/src/IceBox/Server.java new file mode 100644 index 00000000000..1958efdbf0e --- /dev/null +++ b/java/src/IceBox/Server.java @@ -0,0 +1,51 @@ +// ********************************************************************** +// +// Copyright (c) 2002 +// MutableRealms, Inc. +// Huntsville, AL, USA +// +// All Rights Reserved +// +// ********************************************************************** + +package IceBox; + +public final class Server +{ + public static void + main(String[] args) + { + Ice.Communicator communicator = null; + int status = 0; + + Ice.Util.addArgumentPrefix("IceBox"); + + try + { + Ice.StringSeqHolder argsH = new Ice.StringSeqHolder(args); + communicator = Ice.Util.initialize(argsH); + ServiceManagerI serviceManagerImpl = new ServiceManagerI(communicator, argsH.value); + status = serviceManagerImpl.run(); + } + catch (Ice.LocalException ex) + { + ex.printStackTrace(); + status = 1; + } + + if (communicator != null) + { + try + { + communicator.destroy(); + } + catch (Ice.LocalException ex) + { + ex.printStackTrace(); + status = 1; + } + } + + System.exit(status); + } +} |