Managing Your Web Sessions

When an HTML client request is received by your JADE application, the Web session manager determines whether the session is for an existing session. If there is no existing session, a new instance of WebSession subclass is created. (For details, see "WebSession Class", in Chapter 1 of the JADE Encyclopaedia of Classes.)

The last access timestamp determines the disconnect status. If there is no activity for the session for the period of time specified in the Session Timeout text box of the Define Application dialog, the session is terminated. If you transmit a request after the specified timeout period, you are informed that the Web session has timed out, you must reconnect to the JADE application, and then sign on again.

You can reimplement the Application::createSessionErrorMessage method if you want to display a different session error message on the Web browser when a Web session cannot be created. The returned string should be in HTML format, for correct rendering on the browser.

The Application class provides the getCurrentSession, getCurrentSessionId, getSessionTimeout, and setSessionTimeout methods, to enable you to return the current Web session, its identifier, the Web session timeout value specified for the application, and dynamically set the timeout period for all Web sessions that are subsequently created, respectively. For details, see Chapter 1 of the JADE Encyclopaedia of Classes.