In C#.NET RFA, If I do sess = Session.Acquire("Session1") from multiple independent application components under the same session name, will sess.Release() tear down the other application components sessions before they're done with them? Or should I Release() once for each Acquire() ?
Anders A. Søndergaard
If you refer to the documentation you will note the following:
Acquire : Acquires a reference to a session with 'name'. If a session already exists with 'name', then return that session.
Release : Releases a reference to the session. Once the last reference is released, the session will be removed.
So, as long as the number of Acquire and Release calls match, the session will not close down until the last reference is release.
They are used in the same process. The session name unfortunately also identifies the part of the configuration file to use, so you can't use the same configuration without also using the same session.
The question is, if I acquire the same session name from different places in the same application, should I Relase() once in total, or once for each Acquire() ?
The application in question is not RFA centric at all, and only uses it as a generally accessible sub-component.