Kbase P99620: Client context retrieval does not work on AppServer partition other than Astra
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  4/3/2009 |
|
Status: Verified
SYMPTOM(s):
Client context retrieval does not work on AppServer partition other than Astra
If a procedure is run on the AppServer using an AppServer other Astra, there is no user context available
Properties like currentLanguageObj are not available
No audit records are created
Translation functions like translatePhrase, do not work
FACT(s) (Environment):
OpenEdge 10.x
Dynamics
Dynamics 2.0A
Dynamics 2.1A
Dynamics 2.1B
All Supported Operating Systems
CAUSE:
Bug# OE00112526
FIX:
Workaround:
1)Write a user-defined procedure on the AppServer that will call setPropertyList on that server.
2)Create a new manager that traps the ICFCFM_LoginComplete event that is fired after the login has successfully taken place.
3)In the code that handles the event, write code to do a getPropertyList on the user properties in the client session.
4)Add code to the ICFCFM_LoginComplete code that calls the procedure written in step 1 and pass the user properties in so that they can be set on the secondary AppServer(s).
Below is a more detailed description of each step. Once this context has been set on the AppServers, subsequent calls for auditing, etc will work.
Step 1 - Write a user-defined procedure on the AppServer that will call setPropertyList on that server.
This procedure should take two input parameters:
INPUT pcPropertyList AS CHARACTER
INPUT pcPropertyValues AS CHARACTER
The first is the list of properties to be set and the second is the values to set them to.
The procedure should include {adm2/globals.i} and should immediately call setPropertyList in gshSessionManager and pass in these two parameters and ?FALSE? for the SessionOnly parameter.
Step 2 - Create a new manager that traps the ICFCFM_LoginComplete event that is fired after the login has successfully taken place.
Create a new manager named whatever you want to call it.
Add the manager to the *client* session type.
Add a procedure to the manager called ICFCFM_LoginComplete. It takes no parameters.
In the main block for this manager add a SUBSCRIBE statement as follows so that it is done as part of the initialization of the manager:
SUBSCRIBE THIS-PROCEDURE TO ?ICFCFM_LoginComplete?:U ANYWHERE.
Step 3 - In the code that handles the event, write code to do a getPropertyList on the user properties in the client session.
Write code in ICFCFM_LoginComplete to retrieve the context for the following properties from the client session. Call getPropertyList with a ?TRUE? flag for the SessionOnly parameter for this.
Properties:
"currentUserObj":U /* logged in user object number */
"currentUserLogin":U /* logged in user login name */
"currentUserName":U /* logged in user full name */
"currentUserEmail":U /* logged in user email */
"currentLanguageObj":U /* logged into language object number */
"currentLanguageName":U /* logged into language name */
"currentOrganisationObj":U /* logged in user organisation object number */
"currentOrganisationCode":U /* logged in user organisation code */
"currentOrganisationName":U /* logged in user organisation full name */
"currentOrganisationShort":U /* logged in user organisation short code */
"currentProcessDate":U /* processing date specified at login time and used mainly in financials for forward postings */
"currentLoginValues":U /* user defined list of extra login values in the form label,value,label,value, etc. */
"dateFormat":U /* Property to hold Client PC session date format */
"suppressDisplay":U /* Property to suppress Message Display */
"cachedTranslationsOnly":U /* Property to load translations at login time */
"translationEnabled":U /* Property to turn translation on/off */
Step 4 - Add code to the ICFCFM_LoginComple.te code that calls the procedure written in step 1 and pass the user properties in so that they can be set on the secondary AppServer(s).
In the ICFCFM_LoginComplete event handler, write code that calls the new procedure that you wrote in 1 to set the context on the other AppServers, passing in the list of properties mentioned above and the return values that you got back from the getPropertyList call.
Once they have these values set on the secondary AppServers, auditing should work. You could use the same mechanism to set other context that you may want set on the AppServer and you could even make the calls outside of the ICFCFM_LoginComplete event so that you could set this context anywhere.
WARNING: You should be aware that any calls to the procedure that you created in step 1 will result in an extra AppServer hit. You may be able to find ways of reducing the number of AppServer calls by combining this call separately.
WARNING: If you are programming against an Asynchronous AppServer, you need to take special cognizance of the fact that this context may be set at a different time than the original context was set.
.