IceGrid makes it easy to configure an IceBox server with one or more services.
On this page:
Deploying an IceBox Server
An IceBox server shares many of the same characteristics as other servers, but its special requirements necessitate a new descriptor. Unlike other servers, an IceBox server generally hosts multiple independent services, each requiring its own communicator instance and configuration file.
As an example, the following application deploys an IceBox server containing one service:
It looks very similar to a server descriptor. The most significant difference is the service descriptor, which is constructed much like a server in that you can declare its attributes such as object adapters and configuration properties. The order in which services are defined determines the order in which they are loaded by the IceBox server.
The value of the adapter's
name attribute needs additional explanation. The symbol
service is one of the names reserved by IceGrid. In the context of a service descriptor,
} is replaced with the service's name, and so the object adapter is also named
In this application, an IceBox server is deployed on a node and has one service instantiated from the service template. Of particular interest is the
property descriptor, which uses another reserved name
server to form the property value. When the template is instantiated by the service instance descriptor, the symbol
} is replaced with the name of the enclosing server, so the property definition expands as follows:
As with server instances, you can specify additional properties for the service instance without modifying the template. These properties can be defined in the
service-instance element, as shown below:
Advanced Service Templates
A more sophisticated use of templates involves instantiating a service template in a server template:
This application is equivalent to our first example of service templates. Now, however, the process of deploying an identical server on several nodes has become much simpler.
If you need the ability to customize the configuration of a particular service instance, your server instance can define a property set that applies only to the desired service:
As this example demonstrates, the
service attribute of the property set denotes the name of the target service.