PAS4OE: change default Session Model on the PAS instance - Forum - OpenEdge Development - Progress Community

PAS4OE: change default Session Model on the PAS instance

 Forum

PAS4OE: change default Session Model on the PAS instance

This question is not answered

Hello,

Is it possible to change the default Session Model on the PAS instance (server side) from "Session-managed"  to "Session-free"? Not through Connect() statement on the client side. If yes, how to do it?

Regards,
Valeriy

All Replies
  • Hi Valeriy,

    AFAIK, It is not possible. Any reason for not doing at the client side ?

    Regards,

    Irfan

  • Hi!

    Irfan

    Any reason for not doing at the client side ?

    For example when PAS used as a WEB server (requests are performed from browser), so there is no possibility to specify connection parameters..

    Best Regards,

    Aleksandrs

  • Okay. So what kind of transport are you using. If it is APSV and if you are using Java or .NET OpenClient( as you mention that you are using a browser based application) then you can set the sessionModel in it

    Regards,

    Irfan

  • Transport is OEWeb, so HTTP request goes directly to application WEB handler (without OpenClient)

    Regards,
    Aleksandrs

  • By default, WEB transport will be running in Session-free mode. So you should be good. If you want to make it Stateless then you have to bind the sessions using event procedures in the appserver

    Regards,

    Irfan

  • Probably I incorrecly undestand "Session-free" term.

    My problem is following: I have a class with a static variables. On the first request I set this variables. When I perform second request from the same IP, static variables still have values, which were set on the first request. Is it possible to setup PAS this way, that static variable values will not be saved between requests?

    Thank You in advance,

    Regards,

    Aleksandrs

  • Well, there are two approaches: don't use static value but an object instance instead OR make a static Reset method and call this from the AppServer deactivate procedure. Given the limited info it's difficult to advise either one of them.

  • This sounds like a context in which I would question the use of statics.  Why are you using statics here?

    Consulting in Model-Based Development, Transformation, and Object-Oriented Best Practice  http://www.cintegrity.com

  • One might want to question static properties (state) - unless constants - in any context... that is just the OO equivalent of shared variables and I do not see why so many peoples keep on using them and think this is less 'evil' that the aforementioned global variables :)

  • Many thanks to all!