I am new to Flex and Flex dataservices. I have to write an application where flash clients have to update themselves when they receive messages (real-time) from a J2EE server (Glassfish) through BlazeDS.
I tried to implement this via the mx:producer/mx:consumer paradigm. I used some of the code from the "chat" tutorial to achieve this.
When I ran it in the browser (Internet Explorer 6), the flash client(s) did not receive the messages that I send either via a flash producer nor via a servlet from the J2EE server. However, if I press <F5> (refresh) in the browser to do a refresh, from that moment on, all the messages that are send, are received by the flash application in the browser.
Why do I have to do a refresh? Does this look like a coding error?
Any help is very much appreciated.
Inside messaging-config.xml try to use the channels if you use my-polling-amf try to set the
Code in messaging-config.xml:
<destination id="messagesForFlex" >
<channel ref="my-polling-amf" />
Also you can use ServerPush for this type of applications.
Thanks for your response.
With your suggestions, the program ran without me first needed to do a refresh (F5) in the IE explorer window!
In my messaging-config.xml file, the original default channel definition did not contain any polling parameters for the "my-polling-amf" channel. The first default definition pointed to the "my-streaming-amf" channel. Also in my destination definition, I had not defined any channel.
Does this mean that it tried streaming (first default)? Would it work with streaming as well (maybe with additional params)?