About ColdFusion and Flex



ColdFusion includes the Data Management event gateway, which uses the ColdFusion Data Service Adapter to send messages to LiveCycle Data Services ES. This means that ColdFusion applications can notify a Flex application about changes in the data that the destination manages.

Note: To use the Data Management event gateway to send messages to a Flex application, the Flex application must be running on LiveCycle Data Services ES.

How ColdFusion and Flex interact

You can send messages from a ColdFusion application to a Flex application through the Data Management event gateway. This gateway type only lets you send messages from a ColdFusion application to a Flex application.

The following image shows the process in which a message is sent from the ColdFusion application to the Flex application:

  1. The ColdFusion application generates a message, which it sends to the ColdFusion server.

  2. The ColdFusion server sends the message to the Data Management event gateway.

  3. The Data Management event gateway and the ActionScript translator convert ColdFusion values to the appropriate ActionScript 3.0 data types, and then the gateway sends the message to the ColdFusion Data Service Adapter.

  4. The ColdFusion Data Service Adapter sends the message to the LiveCycle Data Services Message Service.

  5. The Message Service passes the message to the Flex application.

    If you are running LiveCycle Data Services ES on the ColdFusion server, communication between LiveCycle Data Services ES and ColdFusion does not use RMI.

    If you are running LiveCycle Data Services ES remotely, to ensure that the RMI registry provides registry service for both LiveCycle Data Services ES and ColdFusion, start LiveCycle Data Services ES first, and then start ColdFusion. If you stop LiveCycle Data Services ES, restart LiveCycle Data Services ES, and then restart the gateway.

    If you are running LiveCycle Data Services ES remotely, the RMI registry, which facilitates communication between the ColdFusion Data Service Adapter and the Data Management event gateway uses port 1099. This port is the default value for Java RMI. You can change the port number by adding -Dcoldfusion.rmiport=1234, replacing 1234 with the appropriate port number, to the Java JVM arguments on both the ColdFusion server and the Flex server.

Application development and deployment process

The following is a typical process for developing and deploying a ColdFusion application that communicates with a Flex application through the Data Management event gateway:

  1. Design your application.

  2. Configure a Data Management event gateway instance.

  3. Write your ColdFusion CFCs, CFM pages, and any other application elements.

  4. Test your application using LiveCycle Data Services ES.

  5. Make the application publicly available.