简体   繁体   English

是否有任何理由不在COM +应用程序中托管COM服务器?

[英]Are there any reasons not to host a COM server in a COM+ application?

The simplest way to transform an in-proc COM server into an out-proc COM server is creating a COM+ application. 将进程内COM服务器转换为进程外COM服务器的最简单方法是创建COM +应用程序。 What are the possible drawbacks of doing it this way? 这样做有什么可能的缺点?

I really can't think of any reason to create your own container or use a 3rd party one (if any exist) in favour of MTS/COM+. 我真的想不出任何理由创建自己的容器或使用第三方(如果有的话)支持MTS / COM +。 I mean it does all the things you'd want: 我的意思是它完成了你想要的所有事情:

  • Lets you chose the distribution of COM objects to container processes. 允许您选择COM对象到容器进程的分发。
  • Lets you configure the account they run under. 允许您配置它们运行的​​帐户。
  • Monitors the container processes and restarts if necessary and can recycle them. 监视容器进程并在必要时重新启动并可以回收它们。
  • Even allows you to host STA components in scenarios where you need multiple threads serviced by starting up multlple worker processes. 甚至允许您在需要通过启动多个工作进程来处理多个线程的情况下托管STA组件。 etc. 等等

It's hard to imagine doing better than that without spending 6 months or more on it. 如果不花费6个月或更长时间,很难想象做得比这更好。

Turning the question inside out, I guess your anti-self might ask, "Why are there options besides the COM+ Server for an out-of-proc COM server? What advantages do these other hosting options provide?" 把问题彻底解决了,我想你的反自我可能会问:“为什么除了COM +服务器之外还有一个用于进程外COM服务器的选项?这些其他托管选项提供了哪些优势?”

I don't have anything prepared, but I am imagining a table - with hosting options across the top as headers in various columns, and the particular attributes as headers in the rows. 我没有准备好任何东西,但我想象的是一个表 - 在顶部作为标题在各个列中提供托管选项,并将特定属性作为行中的标题。 you might evaluate each hosting option on each different area or attribute. 您可以评估每个不同区域或属性上的每个托管选项。

The main difference I see is in the administrative model and capability, and in the flexibility. 我看到的主要区别在于管理模型和功能,以及灵活性。 For example, hosting a COM server in a Windows Service gives you the windows service capabilities - auto start with OS boot; 例如,在Windows服务中托管COM服务器可以为您提供Windows服务功能 - 自动启动操作系统启动; the admin UI associated to services.msc (both administrative/operational things), and the flexibility to add other interfaces into that service (flexibility). 与services.msc关联的管理UI(管理/操作事物),以及将其他接口添加到该服务的灵活性(灵活性)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 未设置COM +应用程序标识 - COM+ Application Identity is not set 将COM服务器添加到COM +服务器应用程序后,无法再在过程中实例化它-为什么? - Once I add a COM server into a COM+ server application I can no longer instantiate it in-proc - why? 获取Identity Windows Com +应用程序? - Get Identity Windows Com+ Application? 如何获得com +应用程序的所有com +组件的列表? - How can I get a list of all the com+ components of a com+ application? 将COM对象导入COM +应用程序,同时保留直接访问COM对象的权限吗? - Import COM object into COM+ application while retaining access to the COM object directly? 如何授予对我的 COM+ 应用程序的访问权限? - How do I grant access to my COM+ application? COM +库应用程序的目的是什么? - What's the purpose of COM+ library applications? 我可以设置一个COM +应用程序来创建“一次性”外发服务器吗? - Can I set up a COM+ application to create “single-use” out-proc servers? 尝试通过组件服务在Windows 8中添加新的COM +应用程序时收到错误消息。 - Getting error message when trying to add new COM+ application in Windows 8 through Component services. 我应该选择哪种方法在单独的进程(COM +或DCOM)中托管进程内服务器? - Which do I choose for hosting my in-proc server in a separate process - COM+ or DCOM?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM