Upgrade to OpenEdge 12.2.5, 12.3 where the CONNECTED() method's behavior will return TRUE once a valid
HTTP connection has been made, similar to an AIA connection to a Classic Appserver. For further details refer to Article:
A remote AppServer call to a PAS MSA fails with error 14810Alternatively, do not use the
CONNECTED() method when programming an ABL application to determine if the connection is available to the PASOE AppServer.
The best way to see if the connection is still valid is to RUN whatever program you are trying to access and catch any errors that may come back then re-establish the connection and retry the RUN as required.
IF IsConnected(server) then do:
method private logical IsConnected (input h as handle):
define variable lconnected as logical no-undo:
do on error undo, throw:
lconnected = h:connected():
catch e as Progress.Lang.Error:
end catch.
return lconnected.
end method.
// Reconnect
You can try implementing code to do a ping against the AppServer and you can even use our HTTP classes to do a GET against the AppServer (requested a HEAD would be the simplest) or try using an ABL socket object to see if you can connect to the server. However, because HTTP is inherently
stateless doing these things immediately prior to making your
real call does not guarantee that the AppServer will still be there.