0

I'm interested in defining multiple event-types my app.config file but it doesn't appear to get loaded by default. Is there something that I'm doing wrong? The event type doesn't exist within com.espertech.esper.client.Configuration.

     <configSections>
    <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,Log4net" />
    <section name="esper-configuration" type="com.espertech.esper.util.EsperSectionHandler,NEsper" />
  </configSections>

      <esper-configuration>
    <engine-settings>
      <defaults>
        <threading>
          <listener-dispatch preserve-order="false" timeout-msec="2000" locking="suspend" />
          <insert-into-dispatch preserve-order="false" timeout-msec="3000" locking="suspend" />
          <internal-timer enabled="false" msec-resolution="1234567" />
          <thread-local style="fast" />
        </threading>
        <event-meta>
          <class-property-resolution style="distinct_case_insensitive" />
        </event-meta>
        <view-resources>
          <share-views enabled="false" />
        </view-resources>
        <logging>
          <execution-path enabled="true" />
        </logging>
        <variables>
          <msec-version-release value="30000" />
        </variables>
      </defaults>
    </engine-settings>
    <event-type name="Products" class="ProtoProduct"/>
    <event-type name="MarketDepths" class="ProtoDepth"/>
    <event-type name="MarketTrades" class="ProtoTrade"/>
    <event-type name="Orders" class="ProtoOrder"/>
    <event-type name="Positions" class="ProtoPosition"/>
    <auto-import import-name="org.mycompany.mypackage.MyUtility"/>
    <auto-import import-name="org.mycompany.util.*"/>
  </esper-configuration>
Morvader
  • 2,317
  • 3
  • 31
  • 44
  • I understand that event-types can be added to a separate XML file but I'm curious to know if its possible to have it loaded within a winform's app.config file. `Configuration configuration = new Configuration(); System.IO.FileInfo fileInfo = new System.IO.FileInfo("sample.esper.cfg.xml"); configuration.Configure(fileInfo);` – user3626901 May 12 '14 at 07:03

1 Answers1

0

The most likely issue is that you haven't used the fully qualified name of the class. In your examples, the classes have no namespace. If your classes are in a namespace add those to the class attribute in your config. If for some reason that isn't the issue, it is most likely that the tips are not visible within the AppDomain. Just make sure they are built into your assembly.

Ajaxx
  • 2,500
  • 4
  • 27
  • 38