Archived

This forum has been archived. Please start a new discussion on GitHub.

Passing parameters to session activation server

Hello,

Extract below from amended sessionserver example. In particular, I want to modify the exe specification to pass in additional parameters to be read by the server on start up. Is this possible or not recommended? If so, please could you show me how to do this?

Thanks,
Keith
<icegrid>

  <application name="Session">

    <server-template id="SessionServer">
      <parameter name="index"/>
      <server id="SimpleServer-${index}" exe="./server --console --config cfg/myconfig.xml" activation="session">
        <adapter name="Hello" endpoints="tcp">
          <allocatable identity="hello-${index}" type="::Demo::Hello" property="Identity"/>
        </adapter>
      </server>
    </server-template>

    <node name="Node1">
      <server-instance template="SessionServer" index="1"/>  
      <server-instance template="SessionServer" index="2"/>          
      <server-instance template="SessionServer" index="3"/>  
      <server-instance template="SessionServer" index="4"/>          
    </node>
  </application>

</icegrid>

Comments

  • benoit
    benoit Rennes, France
    Hi,

    You need to use the XML <option> element:
          <server id="SimpleServer-${index}" exe="./server" activation="session">
            <option>--console</option>
            <option>--config cfg/myconfig.xml</option>
            <adapter name="Hello" endpoints="tcp">
              <allocatable identity="hello-${index}" type="::Demo::Hello" property="Identity"/>
            </adapter>
          </server>
    
    

    Cheers,
    Benoit.