We've some COM+ Application
composed of several DLL
s containing several serviced components each (written in C#), running over Windows Server 2003/2008R2 operating systems.
Under certain circumstances (that we try to avoid as much as possible) we are obliged to apply a patch to correct a bug. To accomplish this what we currently do is (of course assuming that we have all the stuff needed on the destination server):
There is no problem with the mentioned steps above, we built a small application for managing the COM+ Application Catalog
programatically, through the command line, so this way we can update some DLLs and bring the serviced components to live in approx. 2 secs... It is not too much for us and we can afford this (offline) time, but I would like to improve and automatize entirely the process by writing a patching tool.
What I'm trying to figure out is:
COM+ Application
have finished their work (all requests/calls have been finished) so that I can proceed SAFELY to point 2 ?Serviced Components
of a certain COM+ Application
?NOTE: if you are used to work with dcomcnfg, the data I would need to gain access is the same that you see if you expand the COM+ Application
folder under Console Root\Computers\My Computer\<MyComPlusApp>
, then you expand the folder Components
and go to menu View
and select Status
menu item. Windows of course is able to know the status of every COM+ Serviced Component
a display it in the screen, so that's exactly the data what I would need to have access to.
How could I know that all the serviced components of my COM+ Application have finished their work (all requests/calls have been finished) so that I can proceed SAFELY to point 2 ?
You could use the COM+ Instrumentation Interfaces or COM+ Tracking to receive information about your components.
More in details, is there any library that I could use to get the status of the Serviced Components of a certain COM+ Application ?
The IGetAppTrackerData interface should let you get the information you need.
Some caveats: Don't forget that you need to be careful when shutting down the application since the component could not be in call but before shutdown another call comes in that is serviced. Also, in my experience using the COM+ API can get messy and the documentation is sometimes lacking (especially in terms of examples).
It seems like it could be a bit of work to save 2 seconds. :)