Show TOC

getPersistent FunctionLocate this document in the navigation structure

Use

Purpose

Determines whether data is persistent for an entire user session or not.

The context is initialized at the beginning of each request, so the lifetime of context data lasts no longer than the duration of one request/response cycle. Since there can be several such cycles during a user session (which lasts from user logon to user logoff ), the data merged from the service files is, by default, the only data that is persistent for the duration of a user session.

You can use the setPersistent function to make any data persistent for an entire user session in a session context rather than just for one request/response cycle.

This function allows you to test whether the context data is persistent or not.

Syntax

getPersistent (<contextvarname>)

Description

If you call this function by specifying a context variable name cntxtvarname and the context data is persistent for the entire user session, the function returns the value 1

If you call this function by specifying a context variable name cntxtvarname and the context data is not persistent for the entire user session, the function returns the value 0

The session context and the session container are deallocated at the end of each user session.

Example

Determines whether data is persistent for an entire user session or not.

`getPersistent (cntxtname)`