My question is is it possible to connect to two different BlazeDS servers from the same Flex app? I have already read this question: Can a Flex client app connect to BlazeDS running on a different server? However, it appears to be discussing the possibility of connecting a Flex client to a BlazeDS on a different server but not necessarily to another BlazeDS on a different server.
I have also read this question: One Flex client connecting to two webapps using BlazeDS - Detected duplicate HTTP-based FlexSessions
In attempts I have tried, I get the error mentioned in the second question above: Detected duplicate HTTP-based FlexSessions, generally due to the remote host disabling session cookies. Session cookies must be enabled to manage the client connection correctly.
Is connecting one Flex application to two BlazeDS enabled servers completely impossible? We want to be able to have a "common functionality" BlazeDS server that is used by a number of Flex apps that each have their own local BlazeDS server for their own functionality.
//Edit The way I'm currently doing it:
In my mxml file, I'm defining a a channset like so:
<mx:ChannelSet id="dataService1Channel">
<mx:channels>
<mx:AMFChannel id="dataService1AmfChannel"
channelFault="dataService1Fault(event)"
url="http://localhost:7001/dataservice1/messagebroker/amf"/>
</mx:channels>
</mx:ChannelSet>
And then I'm using this channelset in the following configured dataservice (which was autoconfigured when I used FlashBuilder's "Connect to BlazeDS" funcion)
<dataservice1:DataService1Service id="dataService1Service"
fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)"
showBusyCursor="true"
channelSet="{dataService1Channel}"/>
The other dataservice is defined like so:
<dataservice2:DataService2Service id="dataService2Service"
fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)"
showBusyCursor="true"/>
The calls work and I can get the data but I'm getting that warning I mentioned in the form of an alert in the Flex application. If I could suppress that warning, I'd be happy.