1) Deploy flex-tomcat-common to tomcat/common/lib, flex-tomcat-server to tomcat/server/lib.
2) Add MessageBrokerServlet to the web.xml in your web app
3) Deploy some JARs to the WEB-INF/lib directory of your web app: backport-util-concurrent, concurrent, flex-messaging-*
4) Make sure your Java class files are on the web app classpath, typically in WEB-INF/classes
5) Create a services-config.xml
- Declare a service for each Java class that should be accessible
- Declare channels to define how classes may be accessed
- Be sure to set add-no-cache-headers=
- Deploy to WEB-INF/flex within your web app
6) If using tomcat/webapps/ROOT remove context.root from services-config.xml. Otherwise set context-root using mxmlc compile options when compiling the Flex app.
7) To secure the BlazeDS servlet use BlazeDS security constraints but do not restrict the servlet with Tomcat security constraints. It is also possible to use Tomcat security constraints instead of BlazeDS constraints, but the Flex app will not be able to differentiate an authentication failure from a generic channel error.
8) If using multiple web apps with single sign-on the Flex app should be hosted in the same web app that hosts the BlazeDS servlet and Java classes.
9) To see BlazeDS logs use log4j.logger.org.apache.catalina.core=DEBUG
No comments:
Post a Comment