0

我有一个 swf,由于某种原因,它有四个 RemoteObjects 指向同一个 ChannelId,但他们将该通道列为位于两个不同的位置。在五个 RemoteObject 中的四个中,一切都按预期运行,但在第四个(WidgetService)中,dev 上的版本正在从 dev.context.root 切换到 loc.context.root。更令人困惑的是,它只在开发服务器上执行此操作(QA 和生产都很好,本地构建也是如此)。

配置文件中的相关信息如下:

    #这是来自build.properties,Ant使用的
    #在服务器上构建swf
    flex.sdk.dir = /path/to/sdk/flex_sdk_3.2.0.3958
    flex.sdk.bin.dir = ${flex.sdk.dir}/bin
    flex.sdk.framework.dir = ${flex.sdk.dir}/frameworks
    flex.sdk.libs.dir = ${flex.sdk.framework.dir}/libs
    flex.sdk.locale.dir = ${flex.sdk.framework.dir}/locale/{locale}
    flex.sdk.locale = en_US

    loc.context.root = /somename-1.0.4.0000
    dev.context.root = /dev-somename
    qa.context.root = /somename
    prod.context.root = /
    #此值根据构建而更改。
    context.root = ${dev.context.root}
<!-- All of the RemoteObjects are directed here -->
<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"/>
</channel-definition>

<!-- A list of the services -->
<destination id="UserService">
    <properties>
        <factory>spring</factory>
        <source>userService</source>
    </properties>
    <channels>
        <channel ref="my-amf"></channel>
    </channels>
</destination>    

<destination id="SystemService">
    <properties>
        <factory>spring</factory>
        <source>systemService</source>
    </properties>
    <channels>
        <channel ref="my-amf"></channel>
    </channels>
</destination>    

<destination id="SessionService">
    <properties>
        <factory>spring</factory>
        <source>sessionService</source>
    </properties>
    <channels>
        <channel ref="my-amf"></channel>
    </channels>
</destination>    

<destination id="VistorService">
    <properties>
        <factory>spring</factory>
        <source>visitorService</source>
    </properties>
    <channels>
        <channel ref="my-amf"></channel>
    </channels>
</destination>    

<destination id="WidgetService">
    <properties>
        <factory>spring</factory>
        <source>widgetService</source>
    </properties>
    <channels>
        <channel ref="my-amf"></channel>
    </channels>
</destination>  
4

1 回答 1

0

事实证明,另一个开发人员构建了一个 swf,该 swf 在运行时使用项目的本地配置而不是服务器配置加载。

于 2009-07-07T18:00:31.320 回答