What is the behavior of the session properties in the initOptions.js and worklight.properties file?

牧云@^-^@ 提交于 2019-12-13 06:26:41

问题


I'm looking to understand the behavior of the session properties that are defined in the following files

initOptions.js

// # Worklight server connection timeout
//timeout: 30000,

Does this parameter affect the client mobile app and disconnect the connection to the Worklight Server after the defined interval ?

worklight.properties

#####################################################################
#   Idle session timeout in minutes
#####################################################################
#serverSessionTimeout=10

Does this override the Web Container session timeout property on the JEE server to close or destroy idle sessions after the given time interval ?


回答1:


  1. In initOptions.js, the timeout property relates to the amount of time the app will wait for a connection to the Worklight Server.

  2. In worklight.properties, the serverSessionTimeout property does the following: http://docs.oracle.com/javaee/6/api/javax/servlet/http/HttpSession.html#setMaxInactiveInterval(int)

    You can also take a look at this question: SessionTimeout: web.xml vs session.maxInactiveInterval()

    In short, it does what you wrote.



来源:https://stackoverflow.com/questions/21452340/what-is-the-behavior-of-the-session-properties-in-the-initoptions-js-and-worklig

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!