<icegrid>

  <application name="Test">
    <variable name="icepatch.directory" value="${test.dir}/data/original"/>

    <server-template id="IcePatch2">

       <parameter name="instance-name" default="${application}.IcePatch2"/>
       <parameter name="endpoints" default="default"/>
       <parameter name="directory"/>

       <server id="${instance-name}"
               exe="${icepatch2server.exe}"
               application-distrib="false" activation="manual">
         <adapter name="IcePatch2" endpoints="${endpoints}">
           <object identity="${instance-name}/server" type="::IcePatch2::FileServer"/>
         </adapter>
         <properties>
            <property name="IcePatch2.InstanceName" value="${instance-name}"/>
            <property name="IcePatch2.Directory" value="${directory}"/>
         </properties>
       </server>

    </server-template>

    <distrib>
      <directory>dir2</directory>
    </distrib>

    <node name="localnode">

      <server-instance template="IcePatch2" directory="${icepatch.directory}"/>
      <server-instance template="IcePatch2"
                       directory="${icepatch.directory}"
                       instance-name="IcePatch2-Direct"
                       endpoints="default -p 12001"/>

      <server id="server-all" exe="${server.dir}/server" activation="on-demand">
        <adapter name="Server" endpoints="default">
          <object identity="${server}"/>
        </adapter>
        <distrib/>
        <properties>
          <property name="ApplicationDistrib" value="${application.distrib}"/>
          <property name="ServerDistrib" value="${server.distrib}"/>
        </properties>
      </server>

      <server id="server-all-direct" exe="${server.dir}/server" activation="on-demand">
        <adapter name="Server" endpoints="default">
          <object identity="${server}"/>
        </adapter>
        <distrib icepatch="IcePatch2-Direct/server:default -p 12001"/>
        <properties>
          <property name="ApplicationDistrib" value="${application.distrib}"/>
          <property name="ServerDistrib" value="${server.distrib}"/>
        </properties>
      </server>

      <server id="server-dir1" exe="${server.dir}/server" activation="on-demand">
        <adapter name="Server" endpoints="default">
          <object identity="${server}"/>
        </adapter>
        <distrib>
          <directory>dir1</directory>
        </distrib>
        <properties>
          <property name="ApplicationDistrib" value="${application.distrib}"/>
          <property name="ServerDistrib" value="${server.distrib}"/>
        </properties>
      </server>

    </node>
  </application>

</icegrid>
