何らかの理由で、同じChannelIdを指す4つのRemoteObjectを持つswfがありますが、それらはそのチャネルを2つの異なるスポットにあるものとしてリストしています。5つのRemoteObjectのうち4つでは、すべてが期待どおりに動作しますが、4つ目(WidgetService)では、devのバージョンがdev.context.rootからloc.context.rootに切り替わります。さらに混乱させるために、これは開発サーバーでのみ実行されます(ローカルビルドと同様に、QAと本番環境で問題ありません)。
構成ファイルの関連情報は次のとおりです。
#これは、Antによって使用されるbuild.propertiesからのものです #サーバー上に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>