1
0
-1

Hi, and happy new year to all the Uniface community !

Recently we started to develop some business logic services in session services (esv), just because of their intrinsic property of been stateless, as explained in the documentation :

Session service components are stateless, so Uniface provides special triggers for setting and getting state information.

However, calling several time the same session service from a web server page makes it keeping its content (component variables and structure). After a quick check in the signature editor, I realized the signature is not marked stateless itself (that does not surprise me more than that, but that could be a hint).

So, what is the stateless scope of session services ? Is it based on per-request in a web environment ?

As an additional information, I don't do any newinstance/deleteinstance between calls, just activate.

Our current development/production environment version is 9.7.04.

Regards,
Richard

    CommentAdd your comment...

    1 answer

    1.  
      2
      1
      0

      Hi Richard,

      I also wish you a Happy New Year.

      The mentioned note in the documentation is unfortunately a bit misleading. A Session Service is not by default stateless, as stated. I'll ask that the documentation is updated.

      In Uniface 9 you have an Application Generator functionality that can produce a basic 3-tier application. The Session Service components that are generated by the generator will all be called with activate/stateless. I guess this is why the documentation currently says that Session Services are stateless. If you create your own Session Services then you have to make sure yourself that these are called stateless.

      Please note that the Application Generator was dropped in Uniface 10 and is not available or supported anymore.

      I hope this helps.

      Regards,
      Daniel

      1. Richard GILL

        Hi Daniel

        Thank you to make it clear. We don't use the Application Generator, and the Session Service component type was unused in our sources. If the automatic stateless property was effective on them, that would be a nice way to differentiate them. That was the idea.

        Regards,
        Richard

      CommentAdd your comment...