Re: Stateless objects
- From: Johannes Passing <johannes.passing@xxxxxxx>
- Date: Mon, 25 Jul 2005 18:11:52 +0200
If both users call CoCreateInstance, both will get their own instance of this class - regardless of whether object pooling is enabled or not.
If you are using pooling, the client may get a recycled instance - thus, it is your duty to clear all member variables when implementing IObjectControl to avoid another client retrieving a 'dirty' object.
In any case, you should be very careful with storing data in member variables if you are using transactions...
/Johannes
SteveL wrote:
Hi,
If I have a class installed in COM+, which has class level private variables, can the values be exposed to other users of the class if object pooling is not enabled.
For example class 1 is used by UserA and a private variable is set in the class. If UserB is using the same class is there a danger that UserB will be using values set by UserA or do they instantiate their own instance of the class.
If object pooling is turned off, does this mean that this can never happen or do I need to completely remove all my class level variables?
Appreciate your help.
Steve
.
- Follow-Ups:
- Re: Stateless objects
- From: SteveL
- Re: Stateless objects
- References:
- Stateless objects
- From: SteveL
- Stateless objects
- Prev by Date: Re: Unable to cast COM object of type
- Next by Date: Re: Admin rights for using System.EnterpriseServices in .net
- Previous by thread: Stateless objects
- Next by thread: Re: Stateless objects
- Index(es):
Relevant Pages
|