PAS4OE: change default Session Model on the PAS instance

Posted by Valeriy Bashkatov on 14-Mar-2016 07:51

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

Posted by Irfan on 14-Mar-2016 09:50

Hi Valeriy,

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

Posted by Aleksandrs Jefremovs on 14-Mar-2016 10:58

Hi!

[quote user="Irfan "]

Any reason for not doing at the client side ?

[/quote]

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

Posted by Irfan on 14-Mar-2016 11:10

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

Posted by Aleksandrs Jefremovs on 14-Mar-2016 11:49

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

Regards,
Aleksandrs

Posted by Irfan on 14-Mar-2016 12:24

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

Posted by Aleksandrs Jefremovs on 14-Mar-2016 12:44

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

Posted by bronco on 14-Mar-2016 12:52

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.

Posted by Thomas Mercer-Hursh on 14-Mar-2016 13:05

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

Posted by Marian Edu on 14-Mar-2016 13:52

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 :)

Posted by Valeriy Bashkatov on 17-Mar-2016 03:07

Many thanks to all!

This thread is closed