What is the behavior of the session properties in

2019-09-01 14: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.