cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple session issue

former_member316829
Participant
0 Kudos

Hello Experts,

I am using the code as below to generate the session token and append it with Opendoc of a webi Report on a Java page.

IEnterpriseSession es=null; es = CrystalEnterprise.getSessionMgr().logon("User1", "Password@123", "ServerName:6400", "secEnterprise");

ILogonTokenMgr logonToken = es.getLogonTokenMgr();

String token = logonToken.createLogonToken("",3, 1);

response.sendRedirect("http://ServerName:8080/BOE/OpenDocument/opendoc/openDocument.jsp?sIDType=CUID&iDocID=AY674FeISehxjrS..."+token);

Now, I have 3 such links to 3 different webi reports on the page, when I click one link, one session for that user is created.

If the same user clicks on another opendoc link it creates one more session for the same user, and so on.

This way the number keep on increasing, if user clicks on different links. So if there are many users, there will be many sessions created and will take up concurrent license.

Is there any SDK code present, by which I can check if for a particular user, a session is already created and pass the token for that session, to avoid creation of Multiple session with the same user ID.

Regards,

Deepak

Accepted Solutions (1)

Accepted Solutions (1)

daniel_paulsen
Active Contributor

Hi Deepak,

CreateLogonToken will add to the license count when the token is used. This allows logging off the current sessions and then loging back on with that token for the lifetime specified when the token is created.

To share a logon session you will want to use the WCAToken (createWCAToken method). this token can be shared from the same logon session but is terminated after the first logoff or if the session times out. If used in the workflow you explained, it should not add to the license count.

Dan

former_member316829
Participant
0 Kudos

Amazing, it helped. Thanks alot.

Answers (0)