After Yahoo! Maps collaboration, here is another example of enabling collaboration in a Flex application using the publish/subscribe messaging infrastructure of BlazeDS.
This example demonstrates "collaborative forms" (or "collaborative data entry"). Users in different locations can fill in forms "together" in a real-time and in-context collaboration session: changes made by one user are automatically reflected in the other user's application.

Figure 1. My mortgage application
Testing the hosted version
You can right-click the application and select View Source or click here to see the source code of the application.
Notes:
Local installation instructions:
If you don't already have a channel called "my-longpolling-amf", open {blazeds-install-dir}/tomcat/webapps/samples/WEB-INF/flex/services-config.xml and add an AMF long polling channel defined as follows:
<channel-definition id="my-longpolling-amf" class="mx.messaging.channels.AMFChannel">
<endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amflongpolling" class="flex.messaging.endpoints.AMFEndpoint"/>
<properties>
<polling-enabled>true</polling-enabled>
<polling-interval-seconds>5</polling-interval-seconds>
<wait-interval-millis>60000</wait-interval-millis>
<client-wait-interval-millis>1</client-wait-interval-millis>
<max-waiting-poll-requests>200</max-waiting-poll-requests>
</properties>
</channel-definition>
Open WEB-INF/messaging-config.xml and add the following destination:
<destination id="mortgage">
<channels>
<channel ref="my-longpolling-amf"/>
<channel ref="my-polling-amf"/>
</channels>
</destination>
Create a Flex Builder project for the Flex application (collabforms).
Make sure you configure your Flex Builder project to work with BlazeDS. Read instructions on how to set up a Flex Builder project that works with BlazeDS. Make sure your BlazeDS turnkey server is started, and click http://localhost:8400/samples/fb-project-setup.htm
Christophe Coenraets is a Technical Evangelist for Adobe where he focuses on rich Internet applications and enterprise integration. He has been working on Flex since the early days of the product in 2003. In his previous role at Macromedia, Christophe worked on JRun, the company's J2EE application server. Before joining Macromedia, Christophe was managing Java and Internet applications evangelism at Sybase. Christophe has been a regular speaker at conferences worldwide for the last 15 years. He blogs at http://coenraets.org.