Suji Reddy has written all the steps to setup blazeDs in flex.. Please look into it
If this post answers your question or helps, please kindly mark it as such.
Thanks for your answer,
Suji Reddy describes the standard way of setting up blazeDS, configured with xml-files, deployed as .war in tomcat or such. This ist not what we want to do.
On the server side, we do NOT want to configure blazeDS with the xml-files in WEB-INF, instead we want to create all nescessary objects ourself. No xml configuration, just plain java objects, instantiated with the required settings.
That is because we have to run jetty embedded in our application. Jetty embedded can run servlets, too, you don't have to deploy them as .war. So we want to create a MessageBrokerServlet with all the following objects and let this servlet run in jetty.
On the client side, we will probably create the usual file structure with WEB-INF/flex/*.xml in Flash Builder, so we can easily use the data service tools. But these xml configuration files will not be used on the server side, that's just to make client side development more easy.