Requirements  
User level
 
All  

 

The Spring BlazeDS Integration Test Drive consists of a series of samples running “out-of-the-box” that allow you to get up and running integrating Flex (and Adobe AIR) with Spring in minutes.
 

 
Installation Instructions:

  1. Download the Spring/Flex Test Drive.
  2. Unzip it in your root directory.
  3. Navigate to /spring-flex-testdrive-1.0.3/tomcat/bin and start Tomcat (for instance: catalina run).
  4. Open a browser and access http://localhost:8400/spring-flex-testdrive.
  5. Follow the instructions.

 
Importing the Projects in Flash Builder 4

  1. In Flash Builder 4, click File > Import > General > Existing Projects into Workspace.
  2. Specify spring-flex-testdrive-1.0.3/projects as the root directory and click finish.

 
Configuration Walkthrough

 
web.xml
In web.xml, the DispatcherServlet is configured to bootstrap the Spring WebApplicationContext as usual. In this simple configuration, all the /messagebroker requests are mapped to the DispatcherServlet.
 
 
flex-servlet.xml
In flex-servlet.xml, the BlazeDS message broker is configured as a Spring-managed bean using the simple message-broker tag. This will bootstrap the BlazeDS message broker.
 
With the message-broker in place, the Spring beans are configured as usual, and exposed for remote access using the remoting-destination tag.
 
In this Test Drive, we split the configuration into multiple xml files:
 
  1. The application-specific beans are configured in spring/app-config.xml and exposed as remoting destinations in flex-servlet.xml.
  2. The beans that provide the basic infrastructure for the application (Database access and JMS integration) are configured in spring/infrastructure-config.xml.
  3. Security is configured in spring/security-config.xml. For the purpose of this introduction, we use a basic authentication provider.
In your own web application, you can use a different configuration arrangement, including single-file configuration.