Session management

Netsilon occults the complexity of the management of the sessions. A session is described by an internal business model sub class of OclObject. Every session variables defined in the entry context of executable web elements are attributes or links of the session class. Session variables are elaborated when a session instance is created and eventually deleted when the session instance is deleted. The session instance is accessible through a variable named session in the entry context of executable web elements. The purpose of this variable is to get the object identifier of the session instance using the operation getOID().

Netsilon transmits in a transparent way the session from pages to pages and supports the storage of session ids in URL or in cookie.

Properties

The properties are defined in the Site (root) node of a project.

Name Name of the site.
Session stored in URL: the session id in stored in the URL of every dynamic page of the site.
Cookie: the session id is stored in a cookie on the client side.
URL and Cookie: the session id is stored both in the URL of every dynamic page and in a cookie on the client side.
Session timeout in seconds Minimal duration before the expiry of a session.
Expression that gives the URL of an entry page to jump to when a session has timed out Xion expression returning a String that contains an URL to jump to when the session has expired. This can be for example the main entry in the site.
Example: "http://www.mydotcom.com/"
Life cycle
When a dynamic page is requested from a client:
  • all expired sessions are deleted. This will also delete all objects linked to the session instance through a composition.
  • if the URL (or the cookie) specifies no session identifier, a new session is created. All session variables are elaborated, created and initialized.
  • if the URL (or the cookie) specifies a valid session identifier, the session instance is activated and the time out reset.
  • if the URL (or the cookie) specifies an expired session identifier, a new session is created. All session variables are elaborated. The client is relocated to the URL specified in the property Expression that gives the URL of an entry page to jump to when a session has timed out.
 
 
TOC ] Previous ] Next ]