VB/COM+ and Component Services

Posted on 2001-06-22
Last Modified: 2008-03-04
I have a few questions on VB code for COM+ and the Component Services in Windows 2000.

1. In Component Services, there is an option to refresh the components, but it never seems to work. If I have a new version of my dll, I need to delete the component from within COM+ and 'Add a New Component' to put it back. Of course I lose my configuration/security within it every time and need to re-key it in. When does the 'Refresh' work or is it necessary to always delete and re-add them?

2. What is the procedure to replace a dll which is already running in COM+ services. Do you manually un-register the dll, and manually re-register the new one. It seems to work differently all the time and I don't understand why. I can actually unregister and remove the old dll / relace it and try to refresh the components in COM+, but it still references the old one. Is there a specific procedure or documentation anywhere on the real correct way to do this. I also always need to restart the web services before replacing a dll in COM+ due to a sharing violation.

3. If a VB ActiveX dll is not using transactions but is going to be in a COM+ application, is it necessary to code in the 'SetComplete' even though not using transactions. I heard it was a good idea in MTS 2.0 for memory reasons but I was thinking that with the JIT activation/deactivation that it wouldn't be necessary. Does anyone know if this is correct? I've already realized that if I don't update the VB code properties to indicate 'MTS-1. Doesn't support transactions', that the ROLES will not work within COM+. I'm assuming that if I just want to throw vendor DLL's into a COM+ application, since I don't have the source code, that I won't be able to use the ROLE security. Is this right.

4. Finally, if I have about 30 dlls, being used within an intranet site, is it better to group them to similar functions in their own COM+ application, or to throw all 30 dll's into 1 COM+ app? I know that it is more efficient within 1 dll but a bad thing about putting all in the same COM+ app, would be if something happened to 1 of them, it would bring down and effect all of them. Any ideas?

Any good books or documentation on the subject. I'm sorry this is such a long email with various questions, it's just that I haven't been able to find the specific answers anywhere on the right way to do this stuff and how it's really suppossed to work.

Thanks in advance for any comments that may help me out. I can basically get things working, but I want to be sure I'm doing it in the most efficient manner and proper manner. Thank You!

Question by:magic321

Accepted Solution

gbaren earned 250 total points
ID: 6221289
1. Never found much use for Refresh myself.

2. Unfortunately, you must remove the existing package and re-create it from scratch. Upgrading applications isn't documented with COM+, but MTS documentation states: "If you want to upgrade an MTS package, you must first delete the previous version and then install the updated package."

3. You don't need to use SetComplete for your component to function. "Everyone says" that it is a "good idea" because if you do use SetComplete or SetAbort, then your component can participate when called from other components.

3.5 You can install 3rd party DLLs in COM+, they'll use roles to the extent that they will run with the role's security context.

4. Consider the update process. Do you want 30 DLLs in one App? I don't think so.

5. Consider this book from Wrox:

6. If you found this information useful, you might consider raising the points to 300. This is a very advanced topic and a multi-part question. I don't know what it is about these points, but their accumulation gives one a sense of accomplishment. Go figure...


Expert Comment

ID: 6878174
ADMINISTRATION WILL BE CONTACTING YOU SHORTLY.  Moderators Computer101 or Netminder will return to finalize these if still open in seven days.  Please post closing recommendations before that time.

Question(s) below appears to have been abandoned. Your options are:
1. Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you. You must tell the participants why you wish to do this, and allow for Expert response.
3. Ask Community Support to help split points between participating experts, or just comment here with details and we'll respond with the process.
4. Delete the question. Again, please comment to advise the other participants why you wish to do this.

For special handling needs, please post a zero point question in the link below and include the question QID/link(s) that it regards.
Please click the Help Desk link on the left for Member Guidelines, Member Agreement and the Question/Answer process.

Please click you Member Profile to view your question history and keep them all current with updates as the collaboration effort continues, to track all your open and locked questions at this site.  If you are an EE Pro user, use the Power Search option to find them.  Anytime you have questions which are LOCKED with a Proposed Answer but does not serve your needs, please reject it and add comments as to why.  In addition, when you do grade the question, if the grade is less than an A, please add a comment as to why.  This helps all involved, as well as future persons who may access this item in the future to seek help.

To view your open questions, please click the following link(s) and keep them all current with updates.

------------>  EXPERTS:  Please leave any comments regarding your closing recommendations if this item remains inactive another seven (7) days.  Also, if you are interested in the cleanup effort, please click this link

Moderators will finalize this question if still open in 7 days, by either moving this to the PAQ (Previously Asked Questions) at zero points, deleting it or awarding expert(s) when recommendations are made, or an independent determination can be made.  Expert input is always appreciated to determine the fair outcome.
Thank you everyone.
Moderator @ Experts Exchange

P.S.  For any year 2000 questions, special attention is needed to ensure the first correct response is awarded, since they are not in the comment date order, but rather in Member ID order.

Expert Comment

ID: 6973154
Comment from expert accepted as answer.

E-E Moderator

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question