Well-Known Registry Objects
Default Identities of Registry Objects
The IceGrid registry hosts several well-known objects. The following table shows the default identities of these objects and their corresponding Slice interfaces:
Default Identity | Interface |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
You can assign unique identities to these objects by configuring the IceGrid.InstanceName property, as shown in the following example:
IceGrid.InstanceName=MP3Grid
This property changes the identities of the well-known objects to use MP3Grid
instead of IceGrid
as the identity category. For example, the identity of the locator becomes MP3Grid/Locator
.
Changes to IceGrid.InstanceName
do not affect the identity of the Ice/LocatorFinder
object. See the next section for more information.
The client's configuration must also be changed to reflect the new identity:
Ice.Default.Locator=MP3Grid/Locator:tcp -h registryhost -p 4061
Furthermore, any uses of these identities in application code must be updated as well.
Using the LocatorFinder
Interface
Ice requires all locator implementations to support the Ice::LocatorFinder
interface:
module Ice
{
interface LocatorFinder
{
Locator* getLocator();
}
}
An object supporting this interface must be available with the identity Ice/LocatorFinder
. By knowing the host and port of a locator's client endpoints, a client can discover the locator's proxy at run time with a call to getLocator
:
Ice::LocatorFinderPrx finder{
communicator,
"Ice/LocatorFinder:tcp -p 4061 -h gridhost");
auto locator = finder.getLocator();
communicator->setDefaultLocator(locator);