Kbase P6344: Instantiating one SDO from another SDO on an appserver retur
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  2/17/2004 |
|
Status: Verified
FACT(s) (Environment):
Progress 9.1C
FACT(s) (Environment):
Progress 9.1D
SYMPTOM(s):
Manually instantiating one SDO from another SDO running on an Appserver returns "?"
Instantiating an SDO occurs in the endTransactionValidate procedure of the other SDO.
CAUSE:
When this code is run on the appserver, there are attributes in the procedure that are set to indicate that it is running on the appserver. The ASDivision attribute is set to "SERVER" when using an appserver, but "" when running locally. When calling fetchRowIdent in HSDO, this attribute seems to be preserved for the SDO. fetchRowIdent calls SendRows (in adm2/data.p). The code here checks the ASDivision attribute, and if that is set to "SERVER", the EMPTY-TEMP-TABLE method is called on hRowObject. As we are in a transaction, this fails, as this is not a NO-UNDO temp table (a message to this effect is in the server.log file, just above the message about RowIdent being ?). At this moment sendRows fails due to this function being called, and therefore fetchRowIdent fails and returns ?. For a local SDO (Because this is being called locally, it is expected that the SDO will perform both the client and server parts of the SDO operation. This works when both SDO's in question are local.
An SDO needs to determine whether it is running as a local SDO, as a client SDO (connecting to the SDO on an appserver) or as a server SDO (the part of the SDO running on the appserver). To determine this, the SDO interrogates the SESSION:REMOTE attribute. The problem here is that this is always TRUE on an appserver. When an SDO is running on an appserver, it is expecting to be the server side of the SDO, and not to be running "locally" to the procedure that called it.
FIX:
After the SDO is run persistently, change it to a local instance.
IF DYNAMIC-FUNCTION("setASDivision":U IN hSDO,"":U) THEN .
This calls the setASDivision function in the second SDO, and sets the
ASDivision to "", meaning it is a "local" instance of the SDO.