Appserver call, routed to session...

Posted by OctavioOlguin on 18-Jan-2018 10:36

Greetings...

For testing purposes, I want to connect to local session, instead of appserver.  (want to stress configure local connection when appserver not availabe)

I remember once I read this "trick", but couldn't find where...was that...

I remember that the connection was ordered to session:something.. but can't recall...

Any help is very appreciatted.

Posted by Roger Blanchard on 18-Jan-2018 10:39

hAppServer = SESSION.

All Replies

Posted by Roger Blanchard on 18-Jan-2018 10:39

hAppServer = SESSION.

Posted by OctavioOlguin on 18-Jan-2018 10:42

That's it?

Thanks... testing...

Posted by OctavioOlguin on 18-Jan-2018 15:01

Yes.. It works...

Just I wonder...

Should I:

Disconnect hAppServer ...?

It throw error (4052) not being an attrib queryable for Pseudo-Widget

and (5425) for hadle not avalid for DELETE OBJECT.

Should I add some validation before delete?

IF NOT (SESSION = hAppServer) THEN DO:

  Disocnnect hAppServer.

  Delete hAppServer.

END.

hAppServer will die when procedure ends...  ?

Is it how is planned?

TIA,..

Posted by Peter Judge on 18-Jan-2018 15:32

You should do exactly that. You cannot delete the SESSION handle.
 

Posted by Patrick Tingen on 19-Jan-2018 01:47

That, or simply add 'NO-ERROR' to it.

Posted by Mike Fechner on 19-Jan-2018 01:54

Generally, I hate NO-ERROR as a simple workaround.

I'd rather test for the conditions beforehand or wrap the single statement with an CATCH block and ignore only certain expected errors and log all others to a log file.

Posted by Roger Blanchard on 19-Jan-2018 07:35

There is no reason to connect, disconnect or delete.

Posted by OctavioOlguin on 19-Jan-2018 08:25

I use that approach, as the realtime conditions of app is to scarce connections to appserver once in a while as the needs of the user can distribute calls to services for few minutes apart from each other....

Or the opposite is common use case?

This thread is closed