Locator Configuration for a Server
3 min read
3 min read
3 min read
3 min read
3 min read
Configuring an Object Adapter with a Locator
An object adapter must be able to obtain a locator proxy in order to register itself with a location service. Each object adapter can be configured with its own locator proxy by defining its Locator property, as shown in the example below for the object adapter named SampleAdapter:
SampleAdapter.Locator=IceGrid/Locator:tcp -h locatorhost -p 10000Alternatively, a server may call setLocator on the object adapter prior to activation. If the object adapter is not explicitly configured with a locator proxy, it uses the default locator as provided by its communicator.
Two other configuration properties influence an object adapter's interactions with a location service during activation:
AdapterId Configuring a non-empty identifier for the
AdapterIdproperty causes the object adapter to register itself with the location service. A locator proxy must also be configured.ReplicaGroupId Configuring a non-empty identifier for the
ReplicaGroupIdproperty indicates that the object adapter is a member of a replica group. For this property to have an effect,AdapterIdmust also be configured with a non-empty value.
We can use these properties as shown below:
SampleAdapter.AdapterId=SampleAdapterIdSampleAdapter.ReplicaGroupId=SampleGroupIdSampleAdapter.Locator=IceGrid/Locator:tcp -h locatorhost -p 10000Registering a Process with a Locator
An activation service, such as an IceGrid node, requests a graceful shutdown of a server through the server's Process facet. IceGrid enables the administrative facility on the servers that it activates.
The communicator registers the Process facet with the location service when it creates the admin object, provided Ice.Admin.ServerId is configured and the communicator has a default locator: it calls setServerProcessProxy on the locator registry with the server ID and a proxy for the Process facet. See Integrating the Process Facet with an Activation Service for details.