Kbase P22153: Client side SDO fails to connect generating errors (8245), (9407)and (5468)
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/15/2008 |
|
Status: Verified
FACT(s) (Environment):
Progress 9.1x
Windows
SYMPTOM(s):
Client side SmartDataObject fails to connect to AppServer
Application Service <Application Service> not found at NameServer at Host <Host> Port <Port>. (8245)
Connection failure for host <host_name> port <port> transport <transport_name>. (9407)
Application connect failure (5468)
CAUSE:
There is no built-in Progress ADM2 code to suppress these error messages. The developer needs to provide the code necessary to trap and process these errors along the lines provided below.
FIX:
The following override to the client side SmartDataObjects InitializeObject procedure tries to connect to the AppServer. If it succeeds, then it disconnects from the AppServer, deletes the handle used and runs SUPER.
/*------------------------------------------------------------------------------
Purpose: Super Override
Parameters:
Notes:
------------------------------------------------------------------------------*/
/* Code placed here will execute PRIOR to standard behavior. */
DEFINE VARIABLE hAppServer AS HANDLE NO-UNDO.
DEFINE VARIABLE lReturnValue AS LOGICAL NO-UNDO.
/* Create AppServer Handle */
CREATE SERVER hAppServer.
/* Connect to the AppServer */
lReturnValue = hAppServer:CONNECT("-AppService ServiceName -H HostName -S 5162", "user", "password") NO-ERROR.
IF NOT lReturnValue THEN
DO:
MESSAGE "failed to connect to the AppServer" VIEW-AS ALERT-BOX INFO BUTTONS OK.
QUIT.
END.
ELSE
/* Disconnect from AppServer & Delete AppServer Handle*/
lReturnValue = hAppServer:DISCONNECT().
DELETE OBJECT hAppServer.
RUN SUPER.
/* Code placed here will execute AFTER standard behavior. */
END PROCEDURE.