您好我正在使用Tomcat 6 + Windows XP环境进行blazeds
应用程序。我的消息已与flex.messaging.endpoints.AMFEndpoint
配对。如果我添加新的flex.messaging.endpoints.StreamingAMFEndpoint
,则无效。它发送通道故障错误,如果我改变了amf中的轮询间隔,那也不会受到影响。 amf频道每3秒发送一次轮询。
有没有人帮我解决这个问题。我已经分享了下面的代码。
我的service-config.xml
<?xml version="1.0" encoding="UTF-8"?>
<services-config>
<services>
<service-include file-path="remoting-config.xml" />
<service-include file-path="messaging-config.xml" />
</services>
<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"/>
<properties>
<polling-enabled>true</polling-enabled>
<polling-interval-millis>60000</polling-interval-millis>
</properties>
</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="3"/>
<user-agent match-on="Firefox" kickstart-bytes="2048" max-streaming-connections-per-session="3"/>
</user-agent-settings>
</properties>
</channel-definition>
</channels>
</services-config>
信息-config.xml中
<service id="message-service" class="flex.messaging.services.MessageService">
<adapters>
<adapter-definition id="CustomServiceAdapter"
class="com.xxx.xxx.CustomServiceAdapter" default="true"/>
</adapters>
<default-channels>
<channel ref="my-streaming-amf"/>
</default-channels>
<destination id="AlarmEvents">
<channels>
<channel ref="my-streaming-amf" />
</channels>
<adapter ref="CustomServiceAdapter"/>
<properties>
<network>
<session-timeout>0</session-timeout>
</network>
<server>
<message-time-to-live>0</message-time-to-live>
<durable>true</durable>
</server>
</properties>
</destination>
</service>