To use Spring objects with Flex BlazeDS the Spring factory can be registered in BlazeDS. Spring beans can be referenced as remote services objects in BlazeDS.
A better way is to manage the Spring beans in a Spring way. Therefor the BlazeDS messagebroker is configured as a Spring bean and Flex messenges are routed to Spring.
There are several ways to integrate Spring Security with the BlazeDS Security process. How this can be done is out of scope here but remains to be solved when building a solid J2EE application.
Person case - Configuration 1
Spring is used to manage the actual configuration of the Flex services for BlazeDS. Configuration in BlazeDS itself can be reduced to a minimum.
There are three steps to realize this. First all Flex calls must be routed via Spring. Secondly Spring must be connected to BlazeDS. Lastly Spring must manage all remote services for BlazeDS.
The routing of Flex calls via Spring is solved in the web.xml. A servlet is defined to do this. When Spring is also used for other purpose it is wise to seperate BlazeDS definitions from the 'normal' Spring application context.
The web.xml may look like this.