Consultor Eletrônico



Kbase P120131: ProDataSet callback procedure does nothing if callback is in persistently run AppServer procedure
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   11/5/2008
Status: Unverified

SYMPTOM(s):

ProDataSet callback procedure does nothing if callback is in persistently run AppServer procedure

Callback context is set to persistent procedure handle

Procedure is run persistently on an AppServer agent from the client

Changes in made to dataset in callback procedure are not seen in dataset on client.

FACT(s) (Environment):

OpenEdge 10.x
All Supported Operating Systems
OpenEdge Language Category: ProDataSets

CAUSE:

This is expected behavior.

Normally, the dataset is passed in BY-REFERENCE into the callback procedure, which will define an INPUT parameter for the dataset.

However, in this case by-value passing is forced because the of the boundary between client and AppServer agent sessions. Since the parameter is INPUT and not INPUT-OUTPUT the dataset will be passed to the AppServer agent, but any changes are not passed back.

FIX:

Restructure the code so callbacks do not cross the AppServer boundary - either move the code that results in the callbacks being fired to the AppServer side, or move the callback procedures to the client side.

One could argue that the functionality should be changed so the dataset is passed to the callback procedure as an INPUT-OUTPUT parameter, but in that case the construct above should still be considered a Bad Practice; each callback event would result in a separate AppServer hit, which is almost certain to kill performance.