question

Upvotes
Accepted
1 3 4 4

Multiple sessions with same name

Hi

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() ?

Sincerely

Anders A. Søndergaard

treprfarfa-apic#
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
Accepted
25.3k 87 12 25

Hi @ansn

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.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Thanks a bundle! This sentence is missing from the RFANET_DevelopersGuide.pdf and RDMUsageGuideNET.pdf documents that I've been looking through.

Upvotes
25.3k 87 12 25

Hi @ansn

If they are used independent processes / applications then they are independent of each other. The name 'session1' is an arbitrary name used to distinguish one session from another within the same application.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
1 3 4 4

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.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.