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:

Properties
IceBox.Service.Greeter=GreeterService:create --Ice.Trace.Dispatch

Assuming this property resides in a configuration file named config, we can start the C++ IceBox server as follows:

Shell
icebox --Ice.Config=config

Build the service project before starting IceBox. The following configuration loads the example service from its .NET 8 Debug build:

Properties
IceBox.Service.Greeter=Service/bin/Debug/net8.0/GreeterService.dll:Service.GreeterService --Ice.Trace.Dispatch

Save 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:

Shell
dotnet tool install iceboxnet --version "3.8.*" --create-manifest-if-needed
dotnet iceboxnet --Ice.Config=config

The configuration file for our example Java service is shown below:

Properties
IceBox.Service.Greeter=com.example.icebox.greeter.service.GreeterService --Ice.Trace.Dispatch

Assuming this property resides in a configuration file named config, we can start the Java IceBox server as follows:

Shell
java com.zeroc.IceBox.Server --Ice.Config=config

The class path must include the Ice and IceBox JAR files, as well as the service's classes.

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.