Steve,

I can offer an example of one issue you mention: defining destinations via
Flex.  Here's a snippet...

private var sourceServer:String = "localhost";
private var stormChannel:Channel = new AMFChannel("my-cfamf", "http://"; +
sourceServer + "/flex2gateway/");
private var amfChannelSet:ChannelSet = new ChannelSet(); 

public function initApp():void {
        // Set the channel (and thus the endpoint) to use

        amfChannelSet.addChannel(stormChannel);
}

private function doSomething():void {
        service = new RemoteObject("ColdFusion");
        service.channelSet = amfChannelSet;
        service.source = "webapps.storm.model.developer.DeveloperService";
        service.getDevelopers();
}



Now, of course, the 'my-cfamf' channel is set up in the services-config.xml
file, which you may already know, but here's an example...

    <channels>
        <channel-definition id="my-cfamf"
class="mx.messaging.channels.AMFChannel">
            <endpoint uri="http://localhost/flex2gateway/";
class="flex.messaging.endpoints.AMFEndpoint"/>
            <properties>
                <polling-enabled>false</polling-enabled>
                <serialization>
                    <instantiate-types>false</instantiate-types>
                </serialization>
            </properties>
        </channel-definition>
    </channels>

Hope that helps

- Steve Brownlee


-----Original Message-----
From: Cutter (CFRelated) [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 01, 2008 9:10 AM
To: CF-Talk
Subject: Re: Examples of BlazeDS with ColdFusion CFCs?

Ok, Andy has this working, which is great, and works for what we need on
this implementation. I guess the big question now is whether it's using
BlazeDS, or if it's using 'Flex Messaging'? Maybe that Gateway type was
automatically updated when we did the CF/BlazeDS integration steps.

That being said, I'm still a bit surprised. I haven't done very much Flex
dev yet, because the documentation for making it work in a CF JRun
mult-server environment is somewhat limited (or confusing), and scattered.
It looks like I can access cfc's serverside through the ColdFusion Gateway,
as long as I'm using the RemoteObject with the source attribute to identify
that CFC. That's fine, but if you're trying to access BlazeDS using the
Flex/Ajax bridge you (seemingly) don't have the ability to define that
source. This means that any cfc you access would have to be accessible as an
event gateway, and that would seem a bit restrictive (plus I worry about the
server overhead on an already taxed server).

With regards to Flex, I've been told that I can define destinations, their
endpoints, and whatnot, directly from within a Flex application. 
This is preferrable from a portability standpoint, as not all developers
would have direct access to their JRun configs (or even the CF Admin), but I
really haven't seen many concrete examples of it.

I really need to dive in more, rather than just dippin' my toes in. If
anyone knows the answers to some of those BlazeDS questions though, please
feel free to share...


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:302428
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to