Skip to Content
0

Multiple session issue

Jul 26, 2017 at 11:04 AM

68

avatar image
Former Member

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=AY674FeISehxjrSTpCwISuOc&token="+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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Daniel Paulsen
Jul 26, 2017 at 05:08 PM
2

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Amazing, it helped. Thanks alot.

0