Friday, August 29, 2008    
Home My Books Blog ColdFusion About Me Back    

Calendar
<< Feb 2006 >>
S M T W T F S
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28        

Search

Categories
 • Acrobat (1) [RSS]
 • Adobe (66) [RSS]
 • AdobeMAX06 (45) [RSS]
 • AdobeMAX07 (59) [RSS]
 • AdobeMAX08 (21) [RSS]
 • AIR (125) [RSS]
 • Appearances (118) [RSS]
 • Books (68) [RSS]
 • CFEclipse (14) [RSS]
 • ColdFusion (1140) [RSS]
 • Data Services (12) [RSS]
 • Flash (102) [RSS]
 • Flex (362) [RSS]
 • Home Automation (2) [RSS]
 • Jobs (91) [RSS]
 • JRun (12) [RSS]
 • Labs (27) [RSS]
 • LiveCycle (21) [RSS]
 • MAX (156) [RSS]
 • Regular Expressions (12) [RSS]
 • RIA (4) [RSS]
 • SQL (37) [RSS]
 • Stuff (503) [RSS]
 • Tips (CF Studio) (80) [RSS]
 • Tips (CF) (795) [RSS]
 • Tips (Dreamweaver) (91) [RSS]
 • Tips (Flex Builder) (2) [RSS]
 • Using CF (135) [RSS]
 • Wireless (97) [RSS]

Other BLOGs
 • Charlie Arehart
 • Lee Brimelow
 • Ray Camden
 • Christophe Coenraets
 • Sean Corfield
 • Mihai Corlan
 • Cornel Creanga
 • John Dowdell
 • Danny Dura
 • Enrique Duvos
 • Steven Erat
 • Kevin Hoyt
 • Serge Jespers
 • Adam Lehman
 • Duane Nickull
 • Miti Pricope
 • Andrew Shorten
 • Ryan Stewart
 • James Ward
 • Greg Wilson
 • Full As A Goog

RSS Feeds
 • Feed
 • Subscribe

Join my mailing list and find out about new books and other topics of interest.

Thoughts, ideas, tips, musings, and pontifications (not necessarily in that order) by Ben Forta ...
NOTE: This is my personal blog, and the opinions and statements voiced here are my own.

Viewing By Entry / Main
February 28, 2006

ColdFusion Flex Enterprise Services Based Session Tracker Online

One of the examples that I have been using in my user group presentations is a ColdFusion Session Tracker. This application uses Flex Enterprise Services to push real time session details to a connected Flex client. The display is a grid of sessions showing request count and when the most recent request occurred, and allowing each session to be expanded (to see details) and collapsed as needed.

The application is a demonstration of:

  • How to send structured data from ColdFusion to Flex clients via Flex Enterprise Services (FES).
  • How to subscribe to messages channels and how to consume received data.
  • The use of custom grid renderers.
  • Using states to implement expand/collapse views within grid cell renderers.

To create and run the ColdFusion Session Tracker you must have the following (all of which are downloadable from the Labs site):

  • ColdFusion MX 7.01 (Enterprise or Developer editions) with the "Mystic" updater installed.
  • Flex Builder 2.0 Beta 1.
  • Flex Enterprise Services 2.0 Beta 1.
As this application uses Flex Enterprise Services it cannot be used with ColdFusion Standard (which does not support the use of event gateways). ColdFusion Enterprise (or Developer Edition) is required.

You can download the application (along with detailed instructions and usage notes) from the ColdFusion/Flex Connectivity page.

TrackBacks
There are no trackbacks for this entry.

No trackback URL. Trackbacks are only allowed via interactive form.

Comments
Now this is interesting.

A couple of questions. What's the msytic update fro CF? ANd where do you get it?
# Posted By Steve Powell | 3/1/06 7:36 AM
Steve, look for ColdFusion/Flex Connectivity. The page you want is http://labs.macromedia.com/technologies/cf_flexcon...

--- Ben
# Posted By Ben Forta | 3/1/06 9:29 AM
Thanks Ben. Had already downloaded it. Just not managed to figure out where the "mystic" bit came from.

Though Flex was recently described as "voodoo" by one of our .net teams recently. Kind of funny given I was demonstrating how to deliver an app they have out in the field without the 34Mb executable that keeps killing our network every time there's a change.
# Posted By Steve Powell | 3/1/06 3:03 PM
Hey Ben,
hanks much for the Session Tracker App ... I'm playing with it a we speak but running into a snag. Now the mxml fles work without a hitch (they compile and I can get the Connected/Subscribe = false messages).

The problem I'm having is that when I run the test1/2.cfm files I keep receiving this error: Unable to find Flex adapter for destination "ColdFusionGateway" in the RMI registry on localhost.

I've got the Flex2CF Event Gateway running and pointing to the Application.CFC, and the ColdFusionGateway is uncommented in the Flexmessaging.xml file, too.

I've been hacking over this thing for some time now; can you offer any suggestions? Thanks much!
# Posted By Saeed Richardson | 3/2/06 4:49 AM
Hi Ben, thanks for the Kansas City Presentation!

I've downloaded the Session Tracker application and installed it. The Flex app runs and the CF test pages work, but the two don't talk to each other.

My question is during the installation the CF gateway, step 1 states: "In ColdFusion Administrator define a new gateway named “Flex2CF” of type “Flex Messaging”. You will need to point it to a CFC file, but no configuration file is needed."

"...point it to a CFC file...", what CFC file would this be?

The only CFC file I have fould is the application.cfc file for the test1.cfm and test2.cfm files.

Is there a CFC file missing or am I missing something here?

Thanks
# Posted By Randy Ellis | 3/2/06 8:59 AM
Saeed, if the Flex app is showing false for connected, and CF is throwing that error, then neither are connecting to FES properly. Check the flex-message-service.xml file (in C:\fes2\jrun4\servers\default\samples\WEB-INF\flex by default) and make sure that the ColdFusoin gateway is not commented out.

See http://www.forta.com/blog/index.cfm/2006/2/1/Getti... for more details on FES setup.

--- Ben
# Posted By Ben Forta | 3/2/06 9:06 AM
Randy, the needed CFC is used to process inbound messages. As the sample app does not need this you can create an empty CFC and just point to that.

--- Ben
# Posted By Ben Forta | 3/2/06 9:07 AM
Thanks much Ben,
I just took and copied your flex-messaging contents into mine and it worked. I'm not sure why but the gateway appeared to be uncommented and it still could not reference the ColdFusionGateway. Maybe it was a rogue comment marker or something like that.

Nonetheless, I'm up and running now. Thanks again!
# Posted By Saeed Richardson | 3/2/06 10:35 AM
Hi Ben,

This is odd, it looks like everything is set up correctly. I have the Main.mxml running, connected=true subscribed=true, no errors thrown on test1.cfm or test2.cfm.

But the grid never displays any session information.

Any thoughts?
# Posted By Gus | 4/5/06 8:05 AM
Hi Ben,

Would like to know if some way exists to manipulate the time of session of the user.

For example, how much time it is logado in the system...

Grateful. Raphael Sbegue
# Posted By Raphael Sbegue | 4/6/06 2:12 PM

  © Copyright 1997-2008 Ben Forta, All Rights Reserved