Show TOC

Sample Project Configuration FileLocate this document in the navigation structure

Use these project configuration CCR file examples to build and modify your XML-based project configuration file.

You can build and modify the project configuration CCR file using the Studio Project Configuration editor or a text editor.

In this example, notice that the CCR file is organized in sections according to the preferences being set, including clusters, managers, bindings, parameters, adapters, and project settings. For information on bindings and parameters, see the SAP Event Stream Processor: Developer Guide. For information on adapters and adapter property sets, see the SAP Event Stream Processor: Adapters Guide.
<?xml version="1.0" encoding="UTF-8"?>
<Configuration xmlns="http://www.sybase.com/esp/project_config/2010/08/">
  <Runtime>
    <Clusters>
      <!-- We need this only if we have a project/stream binding. -->
      <Cluster name="cluster1" type="local">
        <Username>atest</Username>
        <Password>secret</Password>
      </Cluster>
      <Cluster name="cluster2" type="remote">
        <Username>user2</Username>
        <Password>Pass1234</Password>
        <!-- Managers section is required for a remote cluster. Managers for a local cluster are retrieved internally from the node. -->
        <Managers>
          <Manager>http://<host>:<RPC port></Manager>
        </Managers>
      </Cluster>
    </Clusters>
    <Bindings>
      <Binding name="stream1">
        <Cluster>cluster1</Cluster>  <!-- this is always needed. -->
        <Workspace>w1</Workspace>
        <Project>p1</Project>
        <BindingName>b1</BindingName>
        <RemoteStream>remote1</RemoteStream>
      </Binding>
      <Binding name="stream2">
        <Cluster>cluster2</Cluster>  <!-- this is always needed -->
        <Workspace>w2</Workspace>
        <Project>p2</Project>
        <BindingName>b2</BindingName>
        <RemoteStream>remote2</RemoteStream>
      </Binding>
      <Binding name="stream3">
        <Cluster>cluster3</Cluster>  <!-- this is always needed -->
        <Workspace>w3</Workspace>
        <Project>p3</Project>
        <BindingName>b3</BindingName>
        <RemoteStream>remote3</RemoteStream>
      </Binding>
    </Bindings>
    <Parameters>
      <Parameter name="myparam1">foo</Parameter>
      <Parameter name="myparam2">1234</Parameter>
      <Parameter name="myparam3">true</Parameter>
    </Parameters>
    <AdaptersPropertySet>
      <PropertySet name="datalocation1">
        <Property name="myhost1">5555</Property>
      </PropertySet>
      <PropertySet name="datalocation2">
        <Property name="myhost2">6666</Property>
      </PropertySet>
    </AdaptersPropertySet>
  </Runtime>
  <Deployment>
    <Project ha="false">
      <Options>
        <Option name="time-granularity" value="5"/>
        <Option name="debug-level" value="3"/>
        <Option name="java-max-heap" value="512"/>
        <OptionList name="java-classpath">
          <OptionListItem>C:/something/example1.jar</OptionListItem>
          <OptionListItem>C:/something/example2.jar</OptionListItem>
          <OptionListItem>C:/something/</OptionListItem>   
        </OptionList>
      </Options>
      <Instances>
        <Instance>
          <Failover enable="false"/>
          <Affinities>
            <Affinity charge="positive" strength="strong" type="controller" value="myController"/>
          </Affinities>
        </Instance>
      </Instances>
    </Project>
  </Deployment>
</Configuration>
This example shows the Deployment section of the CCR file for a deployment with failover enabled and affinities configured on both instances of an active-active (HA) project.
<Deployment>
  <Project ha="true">
    <Options>
      <Option name="debug-level">1</Option>
    </Options>
    <Instances>
      <Instance name="primary">
        <Affinities>
        <!-- Affinities are optional.  -->
          <Affinity type="controller" charge="positive" strength="weak" value="node1"/> 
          <Affinity type="instance" charge="negative" strength="strong" value="secondary"/>
        </Affinities>
        <Failover enable="false"/>
      </Instance>
      <Instance name="secondary">
        <Affinities>
        <!-- Affinities are optional.  --> 
          <Affinity type="controller" charge="positive" strength="weak" value="node2"/> 
          <Affinity type="instance" charge="negative" strength="strong" value="primary"/>
        </Affinities>
        <Failover enable="true">
          <FailureInterval>120</FailureInterval> <!-- in seconds -->
          <FailuresPerInterval>4</FailuresPerInterval> <!-- counter -->
        </Failover>
      </Instance>
    </Instances>
  </Project> 
</Deployment>