Expand my Community achievements bar.

FlexClient with multiple FlexSession's

Avatar

Level 2
I noticed a FlexClient can be associated with multiple
FlexSession objects and viceversa, a FlexSession can be linked to
multiple FlexClient objects.

What would be a typical scenario
the former of the above would apply for? I found the latter
one works when multiple instances of the same browser connect to
the same webapp. The Javadoc does not say much about it...Thank
you.
6 Replies

Avatar

Former Community Member
Here's an example. Say you have a single Flex application
with 2 consumers. One consumer talks to a destination that uses an
HTTPChannel and the other one talks to a destination that uses
RTMPChannel. In that case, there will be 2 FlexSessions on the
server, more specifically 1 HTTPFlexSession for HTTPChannel and 1
RTMPFlexSession for RTMPChannel and hence your FlexClient will be
associated with 2 FlexSessions.

Avatar

Level 2
Makes sense, I haven't tried this case yet, but I will. Thank
you.

Robert

Avatar

Former Community Member
Why aren't HTTPFlexSession and RTMPFlexSession in the FDS API
Documentation? Adobe's documentation is really a pity.

Avatar

Former Community Member
I think FlexSession is documented and that's what you should
really need to do sesion management.

Avatar

Former Community Member
Mete: In my application I have RPC calls occurring, plus I
need to push data from the server to clients using messaging. I
also need to listen for client disconnections. I think LCDS is the
right tool for this, but only at great cost to developers because
of the unforgiveable documentation. When a client makes a login RPC
call, I execute FlexSession#addSessionDestroyedListener, only to
not catch the disconnection because the RPC calls are occurring
over an AMF channel and therefore using HttpFlexSession rather than
the RTMPFlexSession that is used by messaging. The FlexSession
documentation is insufficient for this use case. Why not bother to
document the subclasses anyway? And explain the session framework,
instead of letting developers figure it out for themselves? It is
silly and costs Adobe and its users time and money.

Avatar

Former Community Member
I see your point. I'll inform the appropriate team for lack
of documentation around this. Thanks a lot for sharing.