|
 |
asp_components thread: Reusing DLL in COM+ environment
Message #1 by Imar Spaanjaars <Imar@S...> on Tue, 25 Feb 2003 10:08:34 +0100
|
|
Hi there,
Does anybody know whether it's possible to reuse a DLL under multiple COM+
packages?
I have the following scenario:
1. A VB COM+ DLL that hosts a generic data access layer with methods like
GetRecordset to be used in ASP pages.
2. To ease administration, this DLL gets its connection string through an
implementation of IObjectConstruct.
3. Whenever the object is instantiated, in IObjectConstruct_Construct the
connection settings are read from the properties dialog of the package
under COM+.
This works fine, but limits me to one unique data access layer (including
one connection string) per server as you can't place the same DLL in
multiple COM+ packages.
As an alternative, I can copy, rename and recompile my VB DLL, effectively
giving it a new GUID and making it unique. However, this isn't an easy and
reusable solution.
Is there some way I can repackage my Data Access layer in multiple COM+
packages?
Cheers,
Imar
Message #2 by "Adrian Forbes" <adrian.forbes@n...> on Tue, 25 Feb 2003 16:15:35 -0000
|
|
> Does anybody know whether it's possible to reuse a DLL under
> multiple COM+ packages?
No, if you add it to another package COM+ will tell you that it is
already registered. How would the OS know which application to load if
you had it in multiple applications?
> As an alternative, I can copy, rename and recompile my VB
> DLL, effectively giving it a new GUID and making it unique.
That is one solution. Another might be to change the logic of your
code. Maybe your constructor can contain multiple connection strings
and the calling app passes on which connection it wants and the DLL
returns the appropriate one.
|
|
 |