Вопрос

My flex frontend is using BlazeDS/Tomcat to collect realtime data.
I am using a plain consumer over a standard streaming-amf channel.

<mx:ChannelSet id="channelSet">
 <mx:StreamingAMFChannel id="streamingAMF" url="messagebroker/streamingamf/" />
</mx:ChannelSet>
<mx:Consumer id="consumer" channelSet="{channelSet}" 
             channelConnect="consumer_channelConnectHandler(event)" 
             channelDisconnect="consumer_channelDisconnectHandler(event)" 
             message="consumer_messageHandler(event.message)"  
             fault="consumer_faultHandler(event)"
             resubscribeAttempts="-1" 
             resubscribeInterval="2000"/>

This setup works just fine in all setups but the following. Visible discrepancies are:

  • Windows 2008 server vs Linux or older Windows
  • Java 1.7.0 vs 1.6.0
  • Tomcat 7.0 vs 6.0

The symptom is consumer.subscribed is never set to true, although consumer.subscribe() is invoked, and seen on the server side:

[BlazeDS]13:49:03.922 [DEBUG] [Endpoint.FlexSession] FlexSession created with id '275E7BE0E76EC4C4E8DB08F770BE2846' for an Http-based client connection.
[BlazeDS]13:49:03.922 [INFO] [Endpoint.General] Channel endpoint skydata-streaming-amf received request.

I checked all logs (catalina, stdout and stderr) without any visible clue on what went wrong. Once again, this exact same setup works in all other instances

Any ideas?

Это было полезно?

Решение

The problem comes from Tomcat 7.0 reverting back to Tomcat 6.0 fixed it right away.

There is a hack available here to fix BlazeDS w/ Tomcat 7.

Другие советы

Once check the connected property of the consumer. And also post the channel set configuration, if possible.

I have been using Tomcat7 and found no problem as such, rather I am using it as it is based on Servlet 3.0 specification and may support multiple clients. I found it here.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top