It does seem that the combination of modules + RTMP endpoints will create one connection per module. After creating a simple application with one module that has RPC calls initiated from both the main app and the module, I witness the following while debugging the Tomcat process:
((flex.messaging.endpoints.rtmp.RTMPFlexSession)flex.messaging.FlexContext.getFlexClient().getFlexSessions().get(0)).getConnection().getId() (java.lang.String) D972C614-0D09-5F90-EE8F-87A9F6E3D030 ((flex.messaging.endpoints.rtmp.RTMPFlexSession)flex.messaging.FlexContext.getFlexClient().getFlexSessions().get(1)).getConnection().getId() (java.lang.String) D972CAB4-2208-CD3E-641B-108E830BDDCF Is there any way to trick LCDS into believing that there is only one RTMPFlexSession for a modularized app? Thank you, Adam --- In [email protected], "aduston1976" <[EMAIL PROTECTED]> wrote: > > 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 >

