<?xml version="1.0" encoding="UTF-8"?>
<services-config>

    <services>
        <service-include file-path="remoting-config.xml" />
        <service-include file-path="proxy-config.xml" />
        <service-include file-path="messaging-config.xml" />
    </services>

    <factories>
       <factory id="flexFactorywf" class="com.horizon.workflow.designer.flex.FlexFactoryImpl"/>
    </factories>

    <security>
    </security>
<!-- remoting 使用通道 -->
    <channels>
        <channel-definition id="my-amf" class="mx.messaging.channels.AMFChannel">
            <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amf" class="flex.messaging.endpoints.AMFEndpoint"/>
        </channel-definition>
    
        <channel-definition id="my-streaming-amf" class="mx.messaging.channels.StreamingAMFChannel">
            <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/streamingamf" class="flex.messaging.endpoints.StreamingAMFEndpoint"/>
            <properties>
               <idle-timeout-minutes>0</idle-timeout-minutes>
               <max-streaming-clients>10</max-streaming-clients>
               <server-to-client-heartbeat-millis>5000</server-to-client-heartbeat-millis>
               <user-agent-settings>
                  <user-agent match-on="MSIE" kickstart-bytes="2048" max-streaming-connections-per-session="15" />
                  <user-agent match-on="Firefox" kickstart-bytes="2048" max-streaming-connections-per-session="15"/>
               </user-agent-settings>
             </properties>
          
        </channel-definition>
        
        <channel-definition id="my-polling-amf" class="mx.messaging.channels.AMFChannel">
            <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amfpolling" class="flex.messaging.endpoints.AMFEndpoint"/>
            <properties>
                <polling-enabled>true</polling-enabled>
                <polling-interval-seconds>4</polling-interval-seconds>
            </properties>
        </channel-definition>
        
        <channel-definition id="my-secure-amf" class="mx.messaging.channels.SecureAMFChannel">
            <endpoint url="https://{server.name}:{server.port}/{context.root}/messagebroker/amfsecure" class="flex.messaging.endpoints.SecureAMFEndpoint"/>
              <properties>   
                <add-no-cache-headers>false</add-no-cache-headers>   
              </properties>
        </channel-definition>

        
</channels>
    <logging>
        <target class="flex.messaging.log.ConsoleTarget" level="Error">
            <properties>
                <prefix>[BlazeDS] </prefix>
                <includeDate>false</includeDate>
                <includeTime>false</includeTime>
                <includeLevel>true</includeLevel>
                <includeCategory>false</includeCategory>
            </properties>
            <filters>
                <pattern>Endpoint.*</pattern>
                <pattern>Service.*</pattern>
                <pattern>Configuration</pattern>
            </filters>
        </target>
    </logging>

    <system>
      <!-- redeploy为将services-config.xml配置成重新部署的模式,即当BlazeDS发现配置文件被修改后,会通知web应用容器重新部署Web应用.由于这样会降低应用的性能,建议开发时使用
其中watch-interval为每隔20秒检测watch-file标签包含的文件的状态.
-->
        <redeploy>
            <enabled>false</enabled>
            <watch-interval>20</watch-interval>
            <watch-file>classes/workflow-conf/flex/services-config.xml</watch-file>
            <watch-file>classes/workflow-conf/flex/proxy-config.xml</watch-file>
            <watch-file>classes/workflow-conf/flex/remoting-config.xml</watch-file>
            <watch-file>classes/workflow-conf/flex/messaging-config.xml</watch-file>
            <!--<touch-file>{context.root}/WEB-INF/web.xml</touch-file>-->
        </redeploy>
       <manageable>false</manageable>
    </system>

</services-config>
