配置远程服务目标:
- destination节点的scope属性值可选application 、session 和request ,指定了远程对象实例作用域
- request:服务器会为每一次请求 都创建一个远程Java对象实例,默认作用域
- session:服务器会为每一个会话 创建一个共享的远程Java对象实例。通常,连接服务器的每一个浏览器实例 构成了一个会话。同一浏览器的不同标签页共享 该远程实例
- application:服务器为每一个Flex应用 创建一个远程的Java对象实例
- 从服务器性能上来说,设置”request“会影响性能 ;可以选择设置”session“或者”application“,然后前台每次绑定数据的时候先清空一次 ,即可
限制远程Java对象可访问方法:
见下代码
<include-methods >
<exclude-methods >
<destination id="groupService"> <properties> <source>com.adobe.ptp.service.GroupService</source> <scope>session</scope> <include-methods> <method name="purchaseItem" /> </include-methods> <exclude-methods> <method name="deleteItem" /> </exclude-methods> </properties> </destination>