Starting the IceBox Server
Incorporating everything we discussed previously, we can now configure and start IceBox servers.
The configuration file for our example C++ service is shown below:
IceBox.Service.Greeter=GreeterService:create --Ice.Trace.DispatchAssuming this property resides in a configuration file named config, we can start the C++ IceBox server as follows:
icebox --Ice.Config=configBuild the service project before starting IceBox. The following configuration loads the example service from its .NET 8 Debug build:
IceBox.Service.Greeter=Service/bin/Debug/net8.0/GreeterService.dll:Service.GreeterService --Ice.Trace.DispatchSave this property in a file named config in the directory that contains the Service project directory. In that directory, install the Ice 3.8 version of iceboxnet as a local tool, then start the IceBox server:
dotnet tool install iceboxnet --version "3.8.*" --create-manifest-if-neededdotnet iceboxnet --Ice.Config=configThe configuration file for our example Java service is shown below:
IceBox.Service.Greeter=com.example.icebox.greeter.service.GreeterService --Ice.Trace.DispatchAssuming this property resides in a configuration file named config, we can start the Java IceBox server as follows:
java com.zeroc.IceBox.Server --Ice.Config=configThe class path must include the Ice and IceBox JAR files, as well as the service's classes.
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.