EGL library j2eeLib

The EGL system library j2eeLib provides functions for EGL-generated code that runs in an application server; specifically, in an application server that complies with Java™ Enterprise Edition (Java EE). Examples are IBM® WebSphere® Application Server and Apache Tomcat. Any EGL code that invokes these functions can run only in such a server. You cannot debug or otherwise run the code unless it is deployed.
The servlet that runs the EGL-generated code maintains storage on the server. You can choose one of three different scopes when you place a value in this storage area:
request
Request scope lasts from the time that the server receives a client request for the application or service until the time that the server responds to that request. The request might be passed from one unit of logic to another.
session
Session scope lasts from the time that the server receives a client request for the application or service until the time that the client-specific session is made invalid; for example, because of a session timeout or because the application or service is restarted.
application
Application scope lasts from the time that the server receives any client request for the application or service until the time that the application or service ends. Application scope involves multiple clients.

The next table lists the system functions in the library j2eeLib.

Table 1. j2eeLib functions
Function Description
clearApplicationAttr (key) Removes the value that is associated with the specified key in application scope storage.
clearEGLSessionAttrs() Removes all values associated with all keys placed in session scope storage.
clearRequestAttr (key) Removes the value that is associated with the specified key in request scope storage.
clearSessionAttr (key) Removes the value that is associated with the specified key in session scope storage.
value = getApplicationAttr (key) Uses a specified key to retrieve a value from application scope storage.
getAuthenticationType() Returns the Java EE authentication method in use for the current web application.
getContext() Returns a context when you are working in a J2EE environment.
getRemoteUser() Returns the user's login ID.
getRequestAttr (key, value)

value = getRequestAttr (key)

Uses a specified key to retrieve a value from request scope storage.
getSessionAttr (key, value)

value = getSessionAttr (key)

Uses a specified key to retrieve a value from session scope storage.
value = getQueryParameter (key) Uses a specified key to retrieve a value from an AJAX request or other query.
isUserInRole(roleName) Indicates whether the user is included in a specified role.
setApplicationAttr (key, value) Uses the specified key to place the specified value in application scope storage.
setRequestAttr (key, value) Uses the specified key to place the specified value in request scope storage.
setSessionAttr (key, value) Uses the specified key to place the specified value in session scope storage

Compatibility

Table 2. Compatibility considerations for j2eeLib
Platform Issue
COBOL generation None of the j2eeLib functions are supported.

Feedback