如果你在IE(or Firefox)里同时在多个tab来access a flex application that uses messaging with a streaming AMF connection,就会出现下列error

cannot grant streaming connection to FlexClient with id '' because max-streaming-connections-per-session limit of '1' has been reached....

注意:在google chrome里不会有这个问题


原因是:By default, BlazeDS uses 1 as the value for max-streaming-connections-per-session. 解决办法是在service-config.xml里修改"max-streaming-connections-per-session" property的设置for Internet Explorer and Firefox.


例:把"max-streaming-connections-per-session" property设置为8

<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="8"/>    
                       <user-agent match-on="Firefox" kickstart-bytes="2048" max-streaming-connections-per-session="8"/>    
               </user-agent-settings>    
        </properties>
</channel-definition>

Logo

昇腾计算产业是基于昇腾系列(HUAWEI Ascend)处理器和基础软件构建的全栈 AI计算基础设施、行业应用及服务,https://devpress.csdn.net/organization/setting/general/146749包括昇腾系列处理器、系列硬件、CANN、AI计算框架、应用使能、开发工具链、管理运维工具、行业应用及服务等全产业链

更多推荐