I'm trying to implement a custom AMFChannel based on the environment my app is deployed in.
Here's my action script class.....this ChannelSet is set to every remote object out there by a parent mxml.
public class ServerUtil
{
import mx.core.FlexGlobals;
import mx.messaging.ChannelSet;
import mx.messaging.channels.AMFChannel;
import mx.controls.Alert;
public function ServerUtil()
{
}
private static var cs:ChannelSet;
public static function getChannelSet():ChannelSet {
if (cs == null){
cs = new ChannelSet();
var amf:AMFChannel = newAMFChannel("my-amf", "http://"+FlexGlobals.topLevelApplication.parameters.blaze Url + "/csrware/messagebroker/amf");
var amf2:AMFChannel = new AMFChannel("my-amf", "http://"+FlexGlobals.topLevelApplication.parameters.blaze Url + "/csrware/messagebroker/amf");
cs.addChannel(amf);
cs.addChannel(amf2);
}
return cs;
}
}
When I start up the app. Everything is fine.
Kill the browser, bring the app back up...everything is fine.
Logout\Login...everything is fine.
But when I open a new tab, or close a tab and reopen a tab, my RPC calls stop working and I get the following error.
I'm wondering if it has something to do with Spring's Flex session mangement.
[RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Ping.Failed error There was an unhandled failure on the server. The FlexSession is invalid. url: 'http://localhost:8080/csrware/messagebroker/amf'"]
at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler()[E:\dev\4.x\frameworks\projects\rpc\src\mx\rpc\Abst ractInvoker.as:345]
at mx.rpc::Responder/fault()[E:\dev\4.x\frameworks\projects\rpc\src\mx\rpc\Resp onder.as:68]
at mx.rpc::AsyncRequest/fault()[E:\dev\4.x\frameworks\projects\rpc\src\mx\rpc\Asyn cRequest.as:113]
at mx.messaging::ChannelSet/faultPendingSends()[E:\dev\4.x\frameworks\projects\rpc\src\mx\messagin g\ChannelSet.as:1614]
at mx.messaging::ChannelSet/channelFaultHandler()[E:\dev\4.x\frameworks\projects\rpc\src\mx\messagin g\ChannelSet.as:1206]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.messaging::Channel/connectFailed()[E:\dev\4.x\frameworks\projects\rpc\src\mx\messagin g\Channel.as:1128]
at mx.messaging.channels::PollingChannel/connectFailed()[E:\dev\4.x\frameworks\projects\rpc\src\mx\messagin g\channels\PollingChannel.as:406]
at mx.messaging.channels::AMFChannel/faultHandler()[E:\dev\4.x\frameworks\projects\rpc\src\mx\messagin g\channels\AMFChannel.as:543]


Reply With Quote
