HighTechTalks DotNet Forums  

How to specify server and partition when activating a COM+ component

Dotnet Framework (Component Services) microsoft.public.dotnet.framework.component_services


Discuss How to specify server and partition when activating a COM+ component in the Dotnet Framework (Component Services) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Kermitt
 
Posts: n/a

Default How to specify server and partition when activating a COM+ component - 09-12-2008 , 01:35 AM






I have a ServicedComponent written in VB.NET (.NET 3.5). From the
client end I need to be able to activate the component on various
servers and in various COM+ partitions on those servers.

I'm aware of the Activator.CreateInstance method of connecting to the
component which lets me specify a server name, but this doesn't seem
to allow me to specify a partition.
Activator.CreateInstance(Type.GetTypeFromProgID("M yApp.MyComponent",
"MyServer", True))

I'm also aware of the BindToMoniker method which lets me specify a
partition ID, but this doesn't seem to allow me to specify the server
name. (Obviously the ID would be replaced with a valid partition ID
in this example.)
Marshal.BindToMoniker("partition:
{00000000-0000-0000-0000-000000000000}/new:MyApp.MyComponent"))

I've seen many examples that show how to specify the server name in a
moniker when using queued components, but my client application will
be always connected so making the server components queued doesn't
make sense.

I also know that I can change the server name in the COM+ proxy via
the ComAdminCatalog, but I need to allow multiple client applications
to make requests from different servers at the same time, and changing
the server this way affects other client applications that are using
the proxy.

I really need to be able to specify both the server and the partition
when I create the object at the client end, and I've completely hit a
dead end trying to find a solution anywhere on the web. Does anyone
know how this can be done or if it's even possible?

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.