问题描述
我有一个swf其中,由于某种原因,具有四个RemoteObjects的指向相同的channelID,但它们列出了信道为处于两种不同的斑点。四五个RemoteObjects的,一切行为与预期相同,但在第四(WidgetService),在开发的版本从dev.context.root切换到loc.context.root。为了使问题更混乱的,它不仅会在开发服务器(QA和生产都很好,因为是本地生成)。
在从配置文件中的相关信息如下:
#这个距离build.properties,它用于通过蚂蚁 q若要建立swf的服务器上 flex.sdk.dir = /path/to/sdk/flex_sdk_3.2.0.3958 flex.sdk.bin.dir = $ {flex.sdk.dir} /箱 flex.sdk.framework.dir = $ {flex.sdk.dir} /框架 flex.sdk.libs.dir = $ {flex.sdk.framework.dir} /库 flex.sdk.locale.dir = $ {flex.sdk.framework.dir} /区域/ {区域} 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}
<! - 所有RemoteObjects的都在这里指挥 - >
<渠道定义ID =我-AMF级=mx.messaging.channels.AMFChannel>
<端点URL =HTTP:// {server.name} {server.port} / {context.root} / messagebroker / AMF级=flex.messaging.endpoints.AMFEndpoint/>
< /信道定义>
<! - 在服务列表 - >
<目标id =UserService的>
<性状>
<工厂>春天< /工厂>
<信源> UserService的< /源>
< /性状>
<信道>
<渠道REF =我-AMF>< /通道>
< /信道>
< /目的>
<目标id =SystemService>
<性状>
<工厂>春天< /工厂>
<信源> systemService< /源>
< /性状>
<信道>
<渠道REF =我-AMF>< /通道>
< /信道>
< /目的>
<目标id =SessionService>
<性状>
<工厂>春天< /工厂>
<信源> sessionService< /源>
< /性状>
<信道>
<渠道REF =我-AMF>< /通道>
< /信道>
< /目的>
<目标id =VistorService>
<性状>
<工厂>春天< /工厂>
<信源> visitorService< /源>
< /性状>
<信道>
<渠道REF =我-AMF>< /通道>
< /信道>
< /目的>
<目标id =WidgetService>
<性状>
<工厂>春天< /工厂>
<信源> widgetService< /源>
< /性状>
<信道>
<渠道REF =我-AMF>< /通道>
< /信道>
< /目的>
原来,另一家开发商建造这是在运行时加载使用服务器配置的项目的本地配置,而不是一个swf。
I have a swf which, for some reason, has four RemoteObjects pointing to the same ChannelId, but they are listing that channel as being at two different spots. In four of the five RemoteObjects, everything behaves as expected, but in the fourth (WidgetService), the version on dev is switching from dev.context.root to loc.context.root. To make matters more confusing, it only does this on the dev server (QA and production are fine, as are local builds).
The relevant information from the config files follows:
#This is from build.properties, which is used by Ant #to build the swf on the server 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 = / #this value is changed based on the build. 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>
It turns out that another developer built a swf which was loaded at run-time using the project's local configuration instead of the server configuration.
这篇关于RemoteObject的不一致通道位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!