Hi,

I am creating a Flex/LCDS app that uses an RTMP channel for both RPC
and messaging. I noticed after modularizing my app (i.e. dividing it
into mx.modules.Modules) that, on the server,
FlexContext.getUserPrincipal would frequently return null during an
RPC call after FlexContext.setUserPrincipal was set in a previous RPC
call. This is unacceptable, since my server requires a notion of user
identity. Looking more closely, I see that
FlexContext.getFlexClient().getFlexSessions() always returns a list
containing k + 1 RTMPFlexSessions, where k is the number of modules
that have loaded so far. One of these FlexSessions contains the right
UserPrincipal. So that is nice; if I need to find my UserPrincipal I
can loop through the list of FlexSessions and get it. But isn't there
one connection per RTMPFlexSession? I think this means that I will
have four times the number of sockets open at any given point in time,
since I have three modules.

I have read Alex Harui's blog posts, btw, and there are zero
references to RemoteObject or my concrete RPC classes that use
RemoteObject anywhere in the module code.

Is there some salient explanation for this behavior?

Thank you,
Adam

Reply via email to