Expand my Community achievements bar.

rtmp and CF Remoting on same Flex2 server

Avatar

Level 1
Hi all,



I've got a Flex2 server instance on JRun4, ColdFusion 7.0.2
running as another application.



I can setup the config files using the
"coldfusion.flash.messaging.ColdFusionAdapter" service declarartion
in the services part of the services-config.xml file. As in below:

[services]

[service id="coldfusion-flashremoting-service"

class="flex.messaging.services.RemotingService"

messageTypes="flex.messaging.messages.RemotingMessage"]



[adapters]

[adapter-definition id="cf-object"
class="coldfusion.flash.messaging.ColdFusionAdapter"
default="true"/]

[/adapters]



[destination id="ColdFusion"]

[channels]

[channel ref="my-cfamf"/]

[/channels]

[properties]

[source]*[/source]

[!-- define the resolution rules and access level of the cfc
being invoked --]

[access]

[!-- Use the ColdFusion mappings to find CFCs, by default
only CFC files under your webroot can be found. --]

[use-mappings]false[/use-mappings]

[!-- allow "public and remote" or just "remote" methods to
be invoked --]

[method-access-level]remote[/method-access-level]

[/access]



[property-case]

[!-- cfc property names --]

[force-cfc-lowercase]false[/force-cfc-lowercase]

[!-- Query column names --]

[force-query-lowercase]false[/force-query-lowercase]

[!-- struct keys --]

[force-struct-lowercase]false[/force-struct-lowercase]

[/property-case]

[/properties]

[/destination]



[/service]

[service-include file-path="remoting-config.xml" /]

[service-include file-path="proxy-config.xml" /]

[service-include file-path="messaging-config.xml" /]

[service-include file-path="data-management-config.xml" /]

[/services]



This setup, however, renders the default rtmp channel
definition useless (I've tried changing ports, etc) - any time I
try to do a producer.send, I get the error
"Client.Error.MessageSend:Send failed:Channel.Connect.Failed error
undefined url:'rtmp://localhost:2038'".



As soon as I remove the coldfusion-specific remoting service,
the rtmp stuff works great - but now I can't connect to CFC's in my
CF app.



I get the exact same results when replacing the default
remoting-config.xml file w/ the stuff from the cf remoting service
declaration sample above.



Is it possible to run these two services in the same
application server?



To clarify, I want to communicate to CFC's in the ColdFusion
app, but I want the Flex apps to talk to one-another without using
the CF rtmp gateway.



Thanks - any help much appreciated!
1 Reply

Avatar

Level 1
nevermind. it was the properties section in the destination
that was erroring, and killing the entire message broker. i'd
copied some code over from a CF example not realizing the
ramifications.