Online documentation - Websydian v6.1 |
The Session entity is included in the SessionControl pattern (as the only entity). The Session entity itself inherits from the DataAccess entity pattern in the STORAGE library.
The Session entity defines the following fields:
SessionID | Unique Session identification. Functionality has to be specified to set the value of this field whenever a new Session record is created. |
SessionStatus | The Status field is used to control
the life-cycle of the Session. Only requests from active
Sessions found in the Session table are allowed to proceed in the
application. The status values defined are:
Active: The Session is used by a web user. Timed out: The Session has been timed out. The Session record may afterwards be deleted (by a batch program). Ended: The web user has actively ended the web Session. |
IpAddress | A part of the security checking is to
compare the incoming IP address for each web request with the IP
address stored for the Session of the request.
When a Session record is created, the IP Address field is set to the IP address of the new web user. |
SessionCreateDate | Date of creation of Session record. |
SessionCreateTime | Time of creation of Session record. |
LastSessionRequestDate | Updated after each validated request and set to date of request. The field is used to determine if the Session should be timed out. |
LastSessionRequestTime | Updated after each validated request and set to time of request. The field is used to determine if the Session should be timed out. |
RequestCount | The request count is increased with one within the current Session for each validated request. |
Two new views are defined for the Session entity:
The ActivesessionsByDateTime view contains only the active Session records in the Session table as a Static selection. The view is sorted by increasing LastSessionRequestDate and LastSessionRequestTime and it can in this way be used to find records to be timed out.
The view contains the TimeOutExpiredSessions and the TimeOutExpiredSessionsINT functions.
The InactiveSessionsByDateTime view contains inactive Session records as a Static selection and is complementary to the view above. The view is sorted by increasing LastSessionRequestDate and LastSessionRequestTime and it is used for finding inactive records to be deleted.
The view contains the DeleteInactiveSessions and the DeleteInactiveSessionsINT functions.