SOAP and ASYNC-Triggers
Author: i2stiller@gmx.de (istiller)
Hi Simple question: Does SOAP and ASYNC-Trigger work together? :-) Background: We do have a SOAP-service-component defined. As a SOAP instance is stateless, this instance will be destroyed just after the call from outside. To hold some information (e.g. settings,l ogon information,...) I do create another, distacched instance of a second component. The second instance will "survive" after the SOAP call and could be fetch (as the next SOAP call) from instancepool by componentname. This will works perfect by now. But then I run into a little bit of a challange. If the USERVER.EXE is killed by taskmanger or crash [okay, UnifAce will never crash :-) ], I could not issue a proper shutdown sequence. To check, if a "logon" is still alive I have to implement some "heartbeat" functionality. $TIMEOUT=1 and a little bit of programming in ASYNC-trigger and voila ... Shit, nothing will happen, the ASYNC ist not fired. So the question is, how to implement a heartbeat functionality? Or which trigger catch the ASNYC if there is no application shell and no instance do have the focus? Any hint is apprecite :-) Ingo
I should have remembered this (documented) limitation.
When using the UTIMER in a Uniface Server then it runs in a separate thread from the main userver process and the communication is done via the Uniface Router. And at the moment it's unfortunately not possible to address a specific shared UServer (or all of them) with UTIMER (or postmessage). So my suggestion would only work if you would limit the number for the specific UST to 1 (which would probably create an undesired bottleneck for the SOAP clients). So instead of storing the mentioned info in a instance you probably have to look for alternative ways (e.g. storing the info in a db table and add an expiration date to the data). But maybe someone else has a better idea how to tackle this. Daniel