精通Flex 3.0――14.1.3 LCDS的内容结构

  LCDS以一个war包的形式提供,这个war包包括一组jar包和一组配置文件。下面针对这组jar包和配置文件的作用进行介绍。LCDS下包括18jar包,按照作用描述如表所示。

   LCDSjar包说明

jar包名称

说明

acrobat-core-charset.jar

文本显示字符集。

acrobat-core.jar

文本显示核心包。

backport-util-concurrent.jar

并发访问处理端口的工具包。

cfdataservicesadapter.jar

针对ColdFusion的数据服务适配器包。

cfgatewayadapter.jar

ColdFustion网关适配器包。

commons-codec-1.3.jar

apache编码工具包。

commons-httpclient-3.0.1.jar

apache发送HTTP请求的工具包。

commons-logging.jar

apache日志处理工具包。

concurrent.jar

并发处理工具包。

flex-acrobat.jar

flexacrobat通信工具包。

flex-bootstrap-jap.jarflex-bootstrap.jar

flex启动处理工具包。

flex-message-common.jarflex-message-opt.jarflex-message-req.jarflex-message.jar

flex消息服务处理工具包。

pdfencryption.jar

pdf加密处理工具包。

除了这组jar包外,还有一组用于描述LCDS服务的xml文件。这组文件的作用如表所示。

  LCDSjar包说明

配置文件名称

说明

data-management-config.xml

flex数据管理服务配置文件。

flash-unicode-table.xml

用于多语言字符集处理的配置文件。

flex-config.xml

flex运行时的基本配置文件。

flex-sdk-desription.xml

flex编译器的基本描述。

flex-webtier-config.xml

flexweb层的基本描述文件。

messageing-config.xml

消息服务的基本配置文件。

mxml-mainifest.xml

flex组件的mxml与类对应关系描述文件(用于在服务端动态编译SWF文件)。

proxy-config.xml

描述HTTP服务的别名配置文件。

remoting-config.xml

描述远程调用Java类的服务配置文件

service-config.xml

描述服务基本设置的配置文件。

其中service-config.xml声明了LCDS主要服务的配置,代码如下所示。

<?xml version="1.0" encoding="UTF-8"?>

<services-config>

    <services>

        <service-include file-path="remoting-config.xml" />

        <service-include file-path="proxy-config.xml" />

        <service-include file-path="messaging-config.xml" />

        <service-include file-path="data-management-config.xml" />

    </services>

    <security>

        <login-command class="flex.messaging.security.JRunLoginCommand" server="JRun"/>

        <security-constraint id="basic-read-access">

            <auth-method>Basic</auth-method>

            <roles>

                <role>guests</role>

                <role>accountants</role>

                <role>employees</role>

                <role>managers</role>

            </roles>

        </security-constraint>

    </security>

    <channels>

        <channel-definition id="my-amf" class="mx.messaging.channels.AMFChannel">

            <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amf" class="flex.messaging.endpoints.AMFEndpoint"/>

            <properties>

                <polling-enabled>false</polling-enabled>

            </properties>

        </channel-definition>

 

        <channel-definition id="my-secure-amf" class="mx.messaging.channels.SecureAMFChannel">

            <endpoint url="https://{server.name}:{server.port}/{context.root}/messagebroker/amfsecure" class="flex.messaging.endpoints.SecureAMFEndpoint"/>

            <properties>

                <add-no-cache-headers>false</add-no-cache-headers>

            </properties>

        </channel-definition>

        <channel-definition id="my-polling-amf" class="mx.messaging.channels.AMFChannel">

            <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amfpolling" class="flex.messaging.endpoints.AMFEndpoint"/>

            <properties>

                <polling-enabled>true</polling-enabled>

                <polling-interval-seconds>8</polling-interval-seconds>

            </properties>

        </channel-definition>

        <channel-definition id="my-rtmp" class="mx.messaging.channels.RTMPChannel">

            <endpoint url="rtmp://{server.name}:2038" class="flex.messaging.endpoints.RTMPEndpoint"/>

            <properties>

                <idle-timeout-minutes>20</idle-timeout-minutes>

            </properties>

        </channel-definition>

        <channel-definition id="my-http" class="mx.messaging.channels.HTTPChannel">

            <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/http" class="flex.messaging.endpoints.HTTPEndpoint"/>

        </channel-definition>

        <channel-definition id="my-secure-http" class="mx.messaging.channels.SecureHTTPChannel">

            <endpoint url="https://{server.name}:{server.port}/{context.root}/messagebroker/httpsecure" class="flex.messaging.endpoints.SecureHTTPEndpoint"/>

            <properties>

                <!--HTTPS requests on some browsers do not work when pragma "no-cache" are set-->

                <add-no-cache-headers>false</add-no-cache-headers>

            </properties>

        </channel-definition>

    </channels>

    <logging>

        <target class="flex.messaging.log.ConsoleTarget" level="Error">

            <properties>

                <prefix>[Flex] </prefix>

                <includeDate>false</includeDate>

                <includeTime>false</includeTime>

                <includeLevel>false</includeLevel>

                <includeCategory>false</includeCategory>

            </properties>

            <filters>

                <pattern>Endpoint.*</pattern>

                <pattern>Service.*</pattern>

                <pattern>Configuration</pattern>

            </filters>

        </target>

    </logging>

 

    <system>

        <redeploy>

            <enabled>true</enabled>

            <watch-interval>20</watch-interval>

            <watch-file>{context.root}/WEB-INF/flex/services-config.xml</watch-file>

            <watch-file>{context.root}/WEB-INF/flex/proxy-config.xml</watch-file>

            <watch-file>{context.root}/WEB-INF/flex/remoting-config.xml</watch-file>

            <watch-file>{context.root}/WEB-INF/flex/messaging-config.xml</watch-file>

            <watch-file>{context.root}/WEB-INF/flex/data-management-config.xml</watch-file>

            <touch-file>{context.root}/WEB-INF/web.xml</touch-file>

        </redeploy>

    </system>

</services-config>

在这个配置文件中声明了remoting服务,dataManage服务和message服务使用的端口号和相关文件的位置。可以通过修改这个文件修改需要的配置。

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值