There are several key things to understand about requests that are processed through the LANSA Composer Request Server. Some of these have consequences that may have a significant bearing on the way that you design your solutions that use the LANSA Composer Request Server.
1. The function "call" happens in a different process or job or even on a different computer
Normally it is impossible for a LANSA application running in one LANSA system and/or partition to directly call a LANSA function running in a different LANSA system and/or partition. In order to emulate this capability, the LANSA Composer Request Server directs the requests to a separate process or job or even a separate server system, exchanging the request and response data with that job as required.
In many respects, this fact is transparent to the requesting application. Depending on your application design it may have no functional implications at all. However, it does mean that the execution context for the function call may not be what you might otherwise expect it to be.
Understanding this point is fundamental - the remaining points in this section are largely a direct consequence of this fact.
2. On IBM i servers, the function "call" executes with the user credentials of the request server job
The LANSA Composer Request Server for IBM i makes no attempt to exchange user credentials with the request server job that executes the request and the request server does not switch user contexts. The request that executes in the request server job will execute with the user credentials of the request server job. If necessary, you can change the way that the request server jobs are started such that they use a different user profile of your choosing. Refer to Configuring the LANSA Composer Request Server for IBM i to Suit Your Needs for further information.
3. The function "call" happens in the execution environment of the request server job
Because the requests execute in a separate process or job, it follows that they are subject to the execution environment of that request server job - not of the job that made the request. Particularly on IBM i servers, this is significant for a range of job attributes, including (but not limited to):
4. The execution environment of the request server job does not persist from one call to another
It is not valid to assume that the execution environment of the request server job(s) that process your requests will persist from one call to another. For example, if a called LANSA function on an IBM i server makes changes to the library list or creates objects in QTEMP, you must not design your solution relying on the fact that those changes will still be in effect for the next called function. There are two main reasons for this: