Actually, it *almost* has nothing to do with ColdFusion, it’s just that I have ColdFusion setup on my machine and that’s the server I use with Flex apps.
For a ColdFusion server, the WEB-INF\flex\messaging-config.xml file has an additional adapter – called cfgateway – set up as default adapter for destinations.
<adapters>
<adapter-definition id="cfgateway" class="coldfusion.flex.CFEventGatewayAdapter" default="true" />
<adapter-definition id="actionscript" class="flex.messaging.services.messaging.adapters.ActionScriptAdapter"/>
<adapter-definition id="jms" class="flex.messaging.services.messaging.adapters.JMSAdapter"/>
</adapters>
So when I created a destination for the quick chat application used in the Introduction to the Flex Message Service article on the Adobe Developer Connection site, it was using the cfgateway adapter by default and causing all kinds of havoc when I tried to run the app.
Therefore, if you are using ColdFusion, just make sure you specify the actionscript adapter when you create destinations for FMS in your messaging-config.xml file.
<destination id="MyTransientTopic">
<adapter ref="actionscript" />
<properties>
<server>
<durable>false</durable>
</server>
</properties>
<channels>
<channel ref="java-polling-amf"/>
</channels>
</destination>
2 Responses for "Using Flex Message Service with ColdFusion and BlazeDS"
I am trying to get flex message service to work with CF. I am not an expert to CF. Here are a couple of questions:
1. Does FMS only work with CF event gateway?
2. Do you have to install FDS to configure the channel in services-config.xml?
Thank you very much for the article.
Chuyan, FMS works with any application server that has a message oriented communication feature, such as JMS, on which you install LCDS or BlazeDS. Therefore, yes, you need to install FDS to configure the channels.
Leave a reply