Keep (non-Durable) SOA Session open for very very long RRS feed

  • Question

  • I plan to deploy an SOA 'client' behind a myWCF service in IIS. myWCF service will accept tasks from a web app from users from time to time and then would create a Session (or join one using sharesession). To minimize the overhead of having to create a new session for every web request made to myWCF, would be great if a SOA session is opened once every day (say, when the first request is made) and all subsequent requests use that session as 'shared' sesssion.

    Thus, how can I keep a non-durable session open for a long duration and somehow close/recycle it once every night (similar to app pool)?

    This way I can submit SOA requests at different points during the day without having to recreate the session every time. 

    Can I call Session.CreateSession() and never call Session.Close() and it will be an always "alive" session?

    • Edited by SRIRAM R Friday, April 17, 2020 3:36 AM
    Friday, April 17, 2020 3:35 AM

All replies

  • Hi SRIRAM R,

    You may use shared session pool or just a normal without closing it. Note a proper ClientIdleTimeout and SessionIdleTimeout in SessionStartInfo.BrokerSettings are required. If you want to close/recycle the session at a specific time, you need out-of-band logic to attach and close the session from the client.


    Yutong Sun

    Friday, April 17, 2020 1:35 PM
  • Thank you -- Whats are the appropriate values for  ClientIdleTimeout  and SessionIdleTimeout for an always open Session ? Will a -1 value in those properties set it to always open session?

    Secondly, what scenarios forces a Session closure by HPC  (if it's not explicitly called via Close())

    Friday, April 17, 2020 4:58 PM