是否从 COM 调用常规 .net 程序集?意味着 COM+ 的好处迷路了?
我有一个托管在 com+ 中的 vb6 组件,它多次调用同一台计算机上的 .net 程序集来获取数据。这个.net程序集非常简单,不是从ServicedComponent派生的,而是简单地公开为Com。
以这种方式使用 .net 程序集是否意味着 .net 组件没有获得 com+ 池等的任何好处,并且使我对它的所有调用都可能非常慢,因为 .net 程序集每次都会重新创建?
非常感谢
I have a vb6 component that hosted in com+ that makes several calls to a .net assembly on same machine to fetch data. This .net assembly is very simple and does not derive from ServicedComponent and is simply exposed as Com.
Does using a .net assembly in this way mean that the .net component is not getting any of the benefits of com+ pooling etc and making all my calls to it likely very slow as .net assembly getting recreated fresh each time?
Many Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这取决于大会正在做什么。 COM+ 为您提供了许多优势,例如事务管理、机器之间的上下文流、池化等。但是,如果您的程序集只是读取文件或类似的内容,那么您的 VB6 DLL 是否托管在是否为 COM+。
现在,如果 .NET 程序集正在与数据库或类似数据库通信,那么它会“登记”在 COM+ 上下文和事务(如果有)中,并且您将获得 COM+ 的好处。
It depends on what the assembly is doing. COM+ gives you many advantages doing things like transaction management, context flow between machines, pooling, etc. However if this assembly of yours is simply reading a file or something like that, then it doesn't really matter if your VB6 DLL is hosted in COM+ or not.
Now if the .NET assembly is talking to a database or some such then yes, it becomes "enlisted" in the COM+ context and transaction (if any) and you are getting the benefits of COM+.