Flash Remoting has been revamped in ColdFusion 9. As a result you will notice a few changes to the xml configuration files under WEB-INF/flex directory.

The services-config.xml file now includes remoting-config.xml, messaging-config.xml and proxy-config.xml files. The channel definition can be found in services-config.xml file and the destinations can be found under the remoting-config.xml file. Just to add again, BlazeDS is integrated by default with ColdFusion 9.

It is important to note the changes in the XML files if you wish to migrate your old destination or channel definitions to ColdFusion 9. If you do not wish to migrate, the new Flash Remoting just works for you with the files shipped with ColdFusion 9.

1. All the ColdFusion specific tags such as <access>, <use-accessor> etc have been moved from the definiton of the destination to the definition of the channel. A new <coldfusion> tag has been added under the channel-definition tag in services-config.xml. You will be able to find these CF specific tags under the coldfusion xml tag.

2. The <instantiate-types> tag under the <serialization> tag under the channel-definition tag is no longer required and has to be taken off.

3. The <enable-small-messages> tag under the serialization tag has to be set to false. This tag has to be added under the serialization tag of the channel.

<serilialization>

                    <enable-small-messages> false<enable-small-messages>

</serialization>

It is important to set the enable-small-mesages setting to false for the new Flash Remoting in ColdFusion 9 to work.

In case you are creating the channel set yourself from the ActionScript code, make sure to set enableSmallMessages property on AMFChannel to false.

<mx:AMFChannel enableSmallMessages=false …>

4. The Endpoint classes for ColdFusion 9 under the channel-definition tag in services-config.xml files have been changed. Here’s the list of new Endpoint classes.

Channel-definition ID  : my-cfamf  and cf-polling-amf                    

New Endpoint class in ColdFusion 9: coldfusion.flash.messaging.CFAMFEndPoint
old Endpoint class : flex.messaging.endpoints.AMFEndpoint

Channel-definition ID  : my-cfamf-secure                      

New Endpoint class in ColdFusion 9: coldfusion.flash.messaging.SecureCFAMFEndPoint
old Endpoint class : flex.messaging.endpoints.SecureAMFEndpoint

Channel-definition ID  : my-cfamf-secure                      

New Endpoint class in ColdFusion 9: coldfusion.flash.messaging.SecureCFAMFEndPoint
old Endpoint class : flex.messaging.endpoints.SecureAMFEndpoint

coldfusion.flash.messaging.CFAMFEndPoint

Channel-definition ID  : cf-rtmp (works only with LCDS)                     

New Endpoint class in ColdFusion 9: coldfusion.flash.messaging.CFRTMPEndPoint
old Endpoint class : flex.messaging.endpoints.RTMPEndpoint

 

Take a look at the ColdFusion 9 Developer Guide for more information. 

To maintain backward compatibility, the old xml files from ColdFusion 8 just work with ColdFusion 9 as well. It is just that you will continue to use old flash remoting that is not as fast as the new Flash Remoting in ColdFusion 9.

Comments

2 Responses to “Changes in the XML configuration files for Flash Remoting in ColdFusion 9”

  1. Henry Ho on October 4th, 2009 12:26 pm

    cf-rtmp still works in CF9 w/o LCDS?

  2. Rakshith on October 4th, 2009 1:05 pm

    @Henry : Nope. It only works with LCDS. Am going to update the post to make it clear.

Leave a Reply