Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

[ Image Removed |../../index.htm#lansa/wamengb3_0175.htm]
You are here:

...

Let's have a look at a simple implementation of session management.

First, set the BEGIN_COM command in the WAM RDMLX to indicate that each webroutine in this WAM must have an active session status before it can be executed UNLESS otherwise indicated by the ONENTRY parameter associated with the specific webroutine. Image Removed

Image Added

The entry point webroutine, in this example MaintainGrid, will be allowed to execute with no session status, as indicated by ONENTRY(*SESSIONSTATUS_NONE). All other webroutines in the WAM (which do not have this parameter setting) require an active session status by default.

This entry webroutine sets the session status to active and can now invoke other webroutines in the WAM, which require an active session status. Image Removed

Image Added

So what happens if the session status is invalid (for example, if I try to invoke another webroutine in this same WAM which does not have the ONENTRY(*SESSIONSTATUS_NONE) setting)?

An invalid session status fires a SessionInvalid event, which can be handled to issue the appropriate information to the user. Image Removed
[ Image Removed |../../index.htm#lansa/wamengb3_0175.htm]

Image Added