all groups > dotnet remoting > august 2007 >
You're in the

dotnet remoting

group:

SAO Singleton - Multiple Instances?


Re: SAO Singleton - Multiple Instances? UL-Tomten
8/9/2007 2:04:26 PM
dotnet remoting:

[quoted text, click to view]

Isn't Activator.CreateInstance() only for CAOs? I think you should
Activator.GetObject(). Here's a basic tutor:
http://www.codeproject.com/csharp/dotnetremotingbasictutor.asp
SAO Singleton - Multiple Instances? Krip
8/9/2007 5:17:51 PM
I've got a server activated object (SAO), in singleton mode (hosted in a
server Console application on same machine as client). On the client, I can
instantiate serveral instances via Activator.CreateInstance, and each
instance maintains its own state correctly (via properties on the object).
This is what I want! However, it's not the way I understand and read that
Singletons are supposed to work (all mention of it indicates that state will
be shared across ALL instances).

Can anyone confirm that I can rely on this stateful type of operation?

Thanks.

P.S. I'm using .NET 2.0.
Re: SAO Singleton - Multiple Instances? Krip
8/10/2007 12:00:00 AM
Right, we might be doing CAOs even though we configured for SAOs. That
matches with the behaviour we're seeing. Thanks for the insight.
AddThis Social Bookmark Button