0

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?

MonoThreaded
  • 11,429
  • 12
  • 71
  • 102
  • If it is related to the platform, you should verify path separators (Windows uses \, Linux uses /) and encoding. Also, switching the BlazeDS log to "Debug" might produce better error output. – weltraumpirat Jul 12 '12 at 16:34
  • This is working fine on a Windows 2003 server. I don't think it's a path problem. BlazeDS is already set to Debug and not showing significant errors. – MonoThreaded Jul 13 '12 at 08:43
  • Here is a related question from myself http://tinyurl.com/7vhnhzg. I could not get BlazeDS to work on Tomcat 7 with streaming. Did you guys compile BlazeDS from SVN or did you use default spring-flex intergated libraries? – Frank Szilinski Jul 16 '12 at 19:59
  • We use default libs, but didn't try version 4 for Tomcat 7. – MonoThreaded Aug 01 '12 at 14:48

2 Answers2

1

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.

Community
  • 1
  • 1
MonoThreaded
  • 11,429
  • 12
  • 71
  • 102
0

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.

akhil_mittal
  • 23,309
  • 7
  • 96
  • 95
  • ChannelSet configuration added. Since consumer_channelConnectHandler is never invoked my guess is consumer.connnected won't change. Somehow BlazeDS is not able to send the connection ack back to the browser. – MonoThreaded Jul 13 '12 at 08:46