Entering content frameBackground documentation Stateless and Stateful Model Locate the document in its SAP Library structure

The Internet Communication Framework supports both stateful and stateless communication in the server role. The ICF can therefore extend the lifetime of a special HTTP request handler beyond that of an individual request.

Stateless mode is the default setting, that is, the attribute STATEFUL of the server control block has the value CO_DISABLED (see IF_HTTP_SERVER). The programmer should carefully consider whether stateful mode is required, as this mode places more demands on the server, which can result in poorer performance.

You should note the following points when working in stateful mode:

  1. In a single session, more than one HTTP request handler can be involved in a series of requests (the session is restricted by the lifetime of the corresponding user context).
  2. There is never more than one instance of a special HTTP request handler in existence at any one time within the one session. In other words, a corresponding HTTP request handler instance is either re-used for sequential requests (default) or is reinstantiated for each individual request (if desired, by the HTTP request handler itself).

It is only possible to re-use the HTTP request handler instance if the URL is exactly the same as in the last request. If the same request handler is being used by a different URL, the object is reinstantiated.

Since HTTP requests differ from each other in their design, and do not provide any inherent support for session contexts, this kind of context must be artificially constructed. Cookies are used for this purpose.

See also:

Structure linkStateful and Stateless BSP Applications

Structure linkA Sample BSP Application

 

 

Leaving content frame