User Sessions
User sessions are created in EBIS which are composed of the user's credentials and the consumer's address (http session). This means that as long as the client software is running on a physical or virtual machine using identical credentials it is always the same user session that is used.
If you want to use different user sessions, all you need to do is add a user-defined login parameter. This changes the credentials and EBIS is forced to create a new user session on the server.
To illustrate this, here is an example (C#):
// Creates session for the user 'user1'.var dictionary = new Dictionary<string, string>();dictionary["login.localename"]="en-US";var session1 = instance.Login("user1", "secret", dictionary);// Session has been created on the server.var sessionID1 = session1.ID;Console.WriteLine("User Session 1: {0}", sessionID1);// Creates session for the user 'user1'.var session2 = instance.Login("user1", "secret", dictionary);var sessionID2 = session2.ID;// SessionID2 is the same as SessionID1.Console.WriteLine("User Session 2: {0}", sessionID2);
To create a new ID, the following code can be used, e.g.:
// Creates session for the user 'user1'.vardictionary = new Dictionary<string,string>();dictionary["login.localename"]="en-US";varsession1 = instance.Login("user1","secret", dictionary);// Session has been created on the server.varsessionID1 = session1.ID;Console.WriteLine("User Session 1: {0}", sessionID1);// Session for user 'user1' has been created.// Adding a user-defined login parameter.dictionary["My.Param"] = "Session 2";varsession2 = instance.Login("user1","secret", dictionary);varsessionID2 = session2.ID;// SessionID2 is not the same as SessionID1.Console.WriteLine("User Session 2: {0}", sessionID2);