Universal Messaging 9.7 | Universal Messaging Concepts | Deployment | Client | Multiplexing Sessions
 
Multiplexing Sessions
Universal Messaging supports the multiplexing of sessions to a specific host in Java, Flex and C#. This allows the circumvention of connection limit issues by packing multiple Universal Messaging sessions into one connection, and can be used to allow the same client to set up multiple subscriptions to a given channel or queue if required.
Multiplexing Sessions
To multiplex two sessions, first construct one session, and then create a new session by multiplexing the original session. These two sessions will now appear to act as normal sessions, but will, in fact, share a single connection.
This can be accomplished either by using the nSession object associated with the original session, or by using the nSessionAttributes used to create this original session. Below are examples of how to multiplex sessions via both methods:

//Construct first session
nsa = new nSessionAttributes(realmDetails, 2);
mySession = nSessionFactory.create(nsa, this);
mySession.init();

//Construct second session by multiplexing the first session.
otherSession = nSessionFactory.createMultiplexed(mySession);
otherSession.init();

//Construct a third session by multiplexing the first session's nSessionAttributes.
thirdSession = nSessionFactory.createMultiplexed(nsa);
thirdSession.init();
Examples of multiplexing a session are available for Java and C# .NET. The Tradespace demo application also provides an example of how to implement multiplexed sessions in Adobe Flex.

Copyright © 2013-2015 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.