Uniface User Forum

 View Only
  • 1.  Identify 'context' for a userver

    PARTNER
    Posted 07-02-2021 16:11

    So, we use stateless client server behaviour, and call (almost) all services as activate/stateless, also (almost) all operations are supposed to end with exit(0) not return. 

    However, someone has obviously missed one, and we are now seeing entries in the urouter for servers "with context" which will hang around until the client which caused them logs out.

    It is becoming imperative that we can identify what this 'context' is, so I can fix the program. I remember asking Daniel a while back (3 years?) and being told that there was no way of finding out. Does anyone have any clever techniques or ideas? 

    It's something the user does a lot, because as soon as I clear one, up pops another. There are no records holding locks in the database which might give me a pointer as to which programs to look for. I've got nothing to go on. 

    Iain 




  • 2.  RE: Identify 'context' for a userver

    PARTNER
    Posted 07-07-2021 09:32

    So, I was able to query the database to find out what scripts were in play for that process, and this pointed me to a specific entity, from where I could narrow down the list of possible services until I found the one with the flaw. 

    We had to call it 'transaction=true' so it required a newinstance, which prevented our usual activate/stateless. I added a deleteinstance, and an exit(0) in the service and the problem has (hopefully) gone away. 

    It would be nice to have some method of querying $detachedinstances or similar for a particular userver though for the future.