Search code examples
sessionibm-mobilefirstmobilefirst-analytics

IBM MobileFirst Analytics Console Total Sessions number with session independent mode configured


I'm working in a project with session independent mode configured (worklight.properties file). In my Analytics Console I can see 68 total adapter calls but the total sessions number shows 0. Is this behavior right? I think must have 1 session created at least.

In this link I found information related, however 0 sessions versus 68 adapter calls sounds rare.


Solution

  • The behaviour you observe is expected. This is because in session independent mode, session count increases when a protected resource is invoked and an OAuth token is issued from the server. This does not appear to be happening in your case with the use of WL.Client.invokeProcedure().

    If you use WLResourceRequest API to invoke your adapter resources , the session count will increase on the first resource request as a new token will be issued from the server. More details on the API in this link.

    Session count will not increase again until the token expires, a protected resource is called, and a new token is issued from the server.

    The information is available in the link you have already referenced.