job-flex-application-context.xml
---[flex-application-context.xml]---
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:jee="http://www.springframework.org/schema/jee"
xmlns:flex="http://www.springframework.org/schema/flex"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-2.5.xsd
http://www.springframework.org/schema/flex http://www.springframework.org/schema/flex/spring-flex-1.0.xsd">
<!-- 加载message-broker服务的一种写法
<flex:message-broker id="_messageBroker"
services-config-path="WEB-INF/flex/services-config.xml">
<flex:mapping pattern="/messagebroker/*" />
<flex:exception-translator ref="myExceptionTranslator" />
</flex:message-broker>
-->
<!-- 加载message-broker服务-->
1 声明
<bean id="_messageBroker"
class="org.springframework.flex.core.MessageBrokerFactoryBean">
<property name="servicesConfigPath"
value="WEB-INF/flex/services-config.xml" />
</bean>
2映射
<bean
class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="mappings">
<value>/*=_messageBroker</value>
</property>
</bean>
3MessageBrokerHandlerAdapter 实际动作 的 处理者
<bean
class="org.springframework.flex.servlet.MessageBrokerHandlerAdapter">
</bean>
以下 的 bean 注册 ,如果 项目 中 没有 加入 spring的 支持 ,则 这些 bean的注册 应该 注册 在
remoting-config.xml 配置文件中的
<!-- 以下的Bean可以直接被Flex客户端可访问RemoteObject-->
<bean id="authenticateRO"
class="com.boco.smp.system.Authenticate">
<property name="daoFactory" ref="daoFactory" />
<flex:remoting-destination />
</bean>