I'm using plain old OpenEdge AppServer (not PAS) 11.7 using a generated proxy dll (Proxy Generator for Open Clients) for C#.
This works quite good apart from setting a timeout for connections. If I call a function using that proxy I want to set a timeout so that the call fails (e.g. by throwing an exception)
I've tried following Progress.Open4GL.RunTimeProperties
RunTimeProperties.ConnectionTimeout
Undocumented. Does not do what the name suggests
RunTimeProperties.SocketTimeout = 8000;
Not documented. Default is 0. Value mostlikely to be milliseconds
Getting closer with this setting. If the execution time of the called function exceeeds this
value an Progress.Open4GL.Exceptions.Open4GLException is thrown
BUT: It only throws when the calling function returns thus it is quite useless. Easy to test by adding a "PAUSE 100" to the function to be called. After 100 seconds the exception gets thrown (and not after 8 seconds)
How to implement a timeout for a function call?
Sort of...
You can set a global timeout for app server calls. But not a function by function timeout.
According to https://knowledgebase.progress.com/articles/Article/P174143
STOP-AFTER apparently doesn't interrupt most statements. It seems that it is checked between statements. Consider the following:
vs.
vs.
So, depending on what your app server code is actually doing this may, or may not, help.