I have added the serverSessionTimeout=3 in the worklight properties file, I have edited this in the WAS server and restarted the application, but when i test the app and keep it idle for 3 mins, i cant see the server session time out automatically, is there anything we need to call on the mobile client to check if the server session time out is done or not. please help
Thanks djrecker
You could try disabling the heartbeat using
WL.Client.setHeartBeatInterval(-1)
Maybe during the initialization of your app
Documentation at:
http://pic.dhe.ibm.com/infocenter/wrklight/v6r0m0/index.jsp?topic=%2Fcom.ibm.worklight.help.doc%2Fapiref%2Fr_wl_client_setheartbeatinterval.html
With that the session timeout may work with the app in foreground too.
Please look at the following documentation to get a better understanding of how the serverSessionTimeout and heartbeat property effect eachother as well as other tuning mechanisms:
http://pic.dhe.ibm.com/infocenter/wrklight/v6r0m0/index.jsp?topic=%2Fcom.ibm.worklight.help.doc%2Fadmin%2Fc_optimizing_and_tuning_of_ibm_wl_server.html
Specifically the "Worklight Server internal configuration" section:
"Consider the following factors:
If the app is in the foreground, a heartbeat message will be sent to the server and the session will not time out. So the app should be placed in the background for the timeout to occur. If that does not help, please try the test for a period of 10 minutes, as this is the default session timeout value.
Normally the value of the serverSessionTimeout is greater than the heartbeat interval so that the session is kept alive when idle and as long as the application is in the foreground. So as long as the app is in the foregraound, by design it will never invalidate the session. But on the other hand, if it is backgrounded then there are no heartbeats and then past the default 10 min in the background state, the session is invalidated. This is the intention here.