Abobe Labs releases BlazeDS - Remoting and Messaging technology

Posted by Dan on Dec 13, 2007 @ 10:34 AM

Adobe Labs just released BlazeDS as a new Open Source project (released under the LGPL v3 license.) Essentially BlazeDS is the remoting and messaging technology behind LiveCycle Data Services. For people familiar with Adobe Flex, they know that this is the "push" technology that allows you to build interfaces that are updated automatically when the data on the server changes. This means you can make data on the screen change in realtime as changes on the server occur.

I spent a few minutes looking through the BlazeDS documentation, but didn't see any real good information related specifically to ColdFusion. However, according to the Release Notes it looks like you can integrate BlazeDS directly with ColdFusion 8.

Integrating BlazeDS with a ColdFusion 8 installation

To integrate BlazeDS with ColdFusion 8 with integrated LiveCycle Data Services ES installation, perform these steps:

  1. Shut down ColdFusion.
  2. Move aside the ColdFusion8/wwwroot/WEB-INF/flex directory.
  3. Edit ColdFusion8/WEB-INF/web.xml:
    • Comment out/remove the definitions of FlexMxmlServlet and FlexInternalServlet servlets.
    • Comment out/remove the servlet mapping for FlexMxmlServlet and FlexInternalServlet.
    • Comment out/remove the taglig definition for the FlexTagLib tag library.
  4. Complete the following instructions for ColdFusion without Integrated LiveCycle Data Services ES.

To integrate BlazeDS with ColdFusion 8 without integrated LiveCycle Data Services ES installation, perform these steps:

  1. Shut down ColdFusion.
  2. Unzip blazeds.war in to a temporary directory (In this example c:\temp\BlazeDS).
  3. Move aside the following jar files from ColdFusion8/lib:
    • flex-messaging.jar
    • flex-messaging-common.jar
    • flex-messaging-opt.jar
    • flex-messaging-req.jar
  4. Copy the following jar files from c:\temp\BlazeDS\WEB-INF\lib to ColdFusion8/lib:
    • flex-messaging-common.jar
    • flex-messaging-core.jar
    • flex-messaging-opt.jar
    • flex-messaging-proxy.jar
    • flex-messaging-remoting.jar
  5. Create a new directory (create the WEB-INF/flex directory if needed):
    ColdFusion8/wwwroot/WEB-INF/flex/jars
  6. Copy the following jar files from c:\temp\BlazeDS\WEB-INF\lib to ColdFusion8/wwwroot/WEB-INF/flex/jars:
    • concurrent.jar
    • cfgatewayadapter (UPDATE: This should be copied to the ColdFusion8/lib folder!)
  7. Set up the configuration files for BlazeDS. You can copy the set of configuration files from the BlazeDS ZIP file (not the WAR file). Copy the following files in resources/ColdFusion to ColdFusion8/wwwroot/WEB-INF/flex:
    • services-config.xml
    • messaging-config.xml
    • proxy-config.xml
    • remoting-config.xml
(Optional)
You can continue to use the configuration files from your integrated LiveCycle Data Services ES installation by doing the following:
  1. Copy services-config.xml, messaging-config.xml, proxy-config.xml, and remoting-config.xml from the WEB-INF/flex directory you moved aside earlier back to ColdFusion8/wwwroot/WEB-INF/flex.
  2. Remove from the following line from the services-config.xml file:
    <service-include file-path="data-management-config.xml" />
  3. Remove the <channel-definition> for the ColdFusion-specific RTMP channel (if not commented out) and remove the java-http and java-secure-http channel definitions.
  4. Uncomment the java-amf, java-secure-amf and java-polling-amf channels. Do not include the java-rtmp channel definition.
  5. Edit the proxy-config.xml file and change the lines:
    <channel ref="java-http"/>
    <!-- <channel ref="java-amf"/> -->

    to the following text:

    <channel ref="java-amf"/>
NOTE:
Thanks to Shigeru Nakagaki, I've updated the instructions above to correctly copy the cfgatewayadapter.jar to the correct folder.

Hopefully we'll start seeing some good examples of using BlazeDS. The BlazeDS download comes with Apache Tomcat and some examples wrapped up in some .war files.

This is definitely exciting news to anyone who wants to build highly interactive UIs that can display changes in realtime.

Categories: HTML/ColdFusion, Flex/Flash, Java

2 Comments

  • I did the "BlazeDS with ColdFusion 8 with integrated LiveCycle Data Services ES installation" steps, and skipped the optional part at the end, and got an error when trying to hit http://localhost/flex2gateway/. Once I had followed the last optional part, all started working again.

    Just a heads up for anyone else? is there something I'm missing, or is the optional part really required in some cases?

    Cheers
    Gareth.
  • @Gareth:

    I haven't had a chance to try it yet, but it would not surprise me at all to find the directions are not exact. It's already been determined that the path to the cfgatewayadapter was incorrect. This is a beta release afterall and I suspect CF testing was not their highest priority for this release.

Add Comment

Leave this field empty