Last post Jul 26, 2010 08:15 AM by Mikesdotnetting
Jul 26, 2010 01:17 AM|MisterFantastic|LINK
We have a class with private properties and variables. We are following singleton pattern to create the instance of the class. But since
the singleton pattern is implemented using the shared members one users change affects others. This created a lot of problems .
Design patterns are used to make the work easier and performance intensive. How can I solve this situation ?
Jul 26, 2010 02:50 AM|Mikesdotnetting|LINK
the singleton pattern is implemented using the shared members one users change affects others. This created a lot of problems
If you do not want other users changes to affect the object, you shouldn't be using the Singleton pattern in this scenario. The whole point of having a singleton is that it represents a global variable accessible to everyone.
Jul 26, 2010 06:47 AM|MisterFantastic|LINK
Thanks for sharing your thoughts on this. I will convert my way of usage to normal. It would be greate if you can give us some idea on how singleton will behave in a load balancer i.e across servers. How instance in one server will be different from others
Jul 26, 2010 08:15 AM|Mikesdotnetting|LINK
This should help: