A
Angelos Karantzalis
Hi y'all ...
I'm a bit puzzled here about .NET class instancing under COM+
Issue 1:
I've a COM+ component, let's call it ... COMDbWrapper that initializes
itself from an xml file.
The data in the file change very rarely, so I would like to keep it in a
single copy in-memory if that's possible.
Towards that goal, the COMDbWrapper uses a Singleton helper in it's
constructor, so that if a helper instance exists, no other instances are
created for the same xml file.
My question is ... will that work under COM+ ??? Do all instances of the
COMDbWrapper use a shared VM [oops! CLR ], and is my Singleton actually a
Singleton ?
Ideally, I'd like to have the wrappers pooled, but only one singleton helper
in memory because it's a very memory-hungry object that contains an xml file
data about 200K. If it's not a singleton, then for 100 COMDbWrappers I have
100*200K memory consumption, but I'm thinking I only consume a mere 200K ...
which would appear very stupid on my behalf, & I'd like to avoid that
Issue 2:
How can I have the same COM+ component under two different COM+
Applications, and differentiate in the caller's code [ or the client app.
configuration ] which instance I want to serve my call ?
Cheers,
Angel
O:]
I'm a bit puzzled here about .NET class instancing under COM+
Issue 1:
I've a COM+ component, let's call it ... COMDbWrapper that initializes
itself from an xml file.
The data in the file change very rarely, so I would like to keep it in a
single copy in-memory if that's possible.
Towards that goal, the COMDbWrapper uses a Singleton helper in it's
constructor, so that if a helper instance exists, no other instances are
created for the same xml file.
My question is ... will that work under COM+ ??? Do all instances of the
COMDbWrapper use a shared VM [oops! CLR ], and is my Singleton actually a
Singleton ?
Ideally, I'd like to have the wrappers pooled, but only one singleton helper
in memory because it's a very memory-hungry object that contains an xml file
data about 200K. If it's not a singleton, then for 100 COMDbWrappers I have
100*200K memory consumption, but I'm thinking I only consume a mere 200K ...
which would appear very stupid on my behalf, & I'd like to avoid that
Issue 2:
How can I have the same COM+ component under two different COM+
Applications, and differentiate in the caller's code [ or the client app.
configuration ] which instance I want to serve my call ?
Cheers,
Angel
O:]