Starting the IceBox Server
Incorporating everything we discussed previously, we can now configure and start IceBox servers.
On this page:
Starting the C++ IceBox Server
The configuration file for our example C++ service is shown below:
IceBox.Service.Hello=HelloService:create Hello.Endpoints=tcp -p 10001
Notice that we define an endpoint for the object adapter created by the Hello
service.
Assuming these properties reside in a configuration file named config
, we can usually start the C++ IceBox server as follows:
$ icebox --Ice.Config=config
Additional command line options are supported, including those that allow the server to run as a Windows service or Unix daemon.
Windows Notes
Several versions of the icebox
executable are included in the binary distribution for Windows. In the table below, <installdir>
represents the directory in which you installed the Ice binary distribution.
Executable | Notes |
---|---|
<installdir>\bin\icebox | Loads 32-bit IceBox services compiled with Visual Studio 2013 |
<installdir>\bin\iceboxd | Loads 32-bit debug IceBox services compiled with Visual Studio 2013 |
<installdir>\bin\x64\icebox | Loads 64-bit IceBox services compiled with Visual Studio 2013 |
<installdir>\bin\x64\iceboxd | Loads 64-bit debug IceBox services compiled with Visual Studio 2013 |
<installdir>\bin\vc1xx\icebox | Loads 32-bit IceBox services compiled with vc1xx |
<installdir>\bin\vc1xx\iceboxd | Loads 32-bit debug IceBox services compiled with vc1xx |
<installdir>\bin\vc1xx\x64\icebox | Loads 64-bit IceBox services compiled with vc1xx |
<installdir>\bin\vc1xx\x64\iceboxd | Loads 64-bit debug IceBox services compiled with vc1xx |
vc1xx corresponds to the following versions of Visual Studio:
Compiler Name | Visual Studio Version | Notes |
---|---|---|
vc140 | Visual Studio 2015 | |
vc120 | Visual Studio 2013 | The default version for Ice 3.6, uses bin and bin\x64 with no subdirectory |
vc110 | Visual Studio 2012 | |
vc100 | Visual Studio 2010 |
Linux Notes
Several versions of the icebox
executable are included in the binary distributions for Linux platforms:
Executable | Notes |
---|---|
icebox | Loads 64-bit IceBox services; only available on 64-bit architectures |
icebox++11 | Loads 64-bit IceBox services compiled in C++11 or C++14 mode; only available on 64-bit architectures |
icebox32 | Loads 32-bit IceBox services |
icebox32++11 | Loads 32-bit IceBox services compiled in C++11 or C++14 mode |
Starting the Java IceBox Server
Our Java configuration is nearly identical to the C++ version, except for the entry point specification:
IceBox.Service.Hello=HelloServiceI Hello.Endpoints=tcp -p 10001
Notice that we define an endpoint for the object adapter created by the Hello
service.
Assuming these properties reside in a configuration file named config
, we can start the Java IceBox server as follows:
$ java IceBox.Server --Ice.Config=config
Starting the C# IceBox Server
The configuration file for our example C# service is shown below:
IceBox.Service.Hello=helloservice.dll:HelloService Hello.Endpoints=tcp -p 10001
Notice that we define an endpoint for the object adapter created by the Hello
service.
Assuming these properties reside in a configuration file named config
, we can start the C# IceBox server as follows:
$ iceboxnet --Ice.Config=config
IceBox Server Failures
At startup, an IceBox server inspects its configuration for all properties having the prefix IceBox.Service
and initializes each service. If initialization fails for a service, the IceBox server invokes the stop
operation on any initialized services, reports an error, and terminates.