For example:
Code:
$more app.xml
<icegrid>
<application name="Ripper">
<replica-group id="EncoderAdapters">
<object identity="EncoderFactory"
type="::Ripper::MP3EncoderFactory"/>
</replica-group>
<server-template id="EncoderServerTemplate">
<parameter name="index"/>
<parameter name="exepath"
default="/opt/ripper/bin/server"/>
<server id="EncoderServer${index}"
exe="${exepath}"
<!-- activation="on-demand"> -->
<adapter name="EncoderAdapter"
replica-group="EncoderAdapters"
register-process="true"
endpoints="tcp"/>
</server>
</server-template>
<node name="Node1">
<server-instance template="EncoderServerTemplate"
index="1"/>
</node>
<node name="Node2">
<server-instance template="EncoderServerTemplate"
index="2"/>
</node>
</application>
</icegrid>
$ icegridadmin --Ice.Config=config
>>> application add "app.xml"
>>> application list
Ripper
>>> server start EncoderServer1
And suppose icegridregistry and icegridnode(node1/node2) have started as expected.
This is the client code:
Ice::ObjectPrx obj = communicator->stringToObject("EncoderFactory");
MyQuestion:
1)
At this time, only EncoderServer1 has started while EncoderServer2 has not. When the ice run time in the client sends the identifier "EncoderFactory" to the Locator(IceGrid), how many endpoints/proxies are returned to the client? One or two ?
2)
if we turn on the <activation="on-demand"> feature in app.xml, how many endpoints/proxies are returned to the client ?