A COBOL application that is deployed as an enterprise server service is always run inside one of the server's service execution processes. The part of the service execution process that runs the application is a tightly managed COBOL run-time environment, or application container. Enterprise Server maintains a consistent state for this container between application invocations to ensure consistent execution behavior.
When a client request arrives, the application program to be invoked is loaded, and then the container sets up its execution environment prior to its invocation. This information includes environment variables, tunables and switches that the application requires. If no run-time configuration information was specified for the service at deployment time, a default environment will be set up for the application.
Client requests can be short-running or long-running. Short-running client requests are requests where there is just one interaction between the client and the service; the client request arrives, the service runs, and a response is returned to the client. Requests from Web services clients are always short-running. Long-running client requests are either requests where the same client makes repeated requests of services and needs data to be preserved between invocations of the service, or where a client makes a request that is part of a transaction. So if the client is a stateful Java bean running in a J2EE server such as WebSphere, the service will run for as long as the bean runs.