如果你在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>