我爱Aspx >> Asp.Net >> COM+ Web 服务:通过复选框路由到 XML Web Services(2) (微软中国)这就是所预期的缓冲的组件:从缓冲池中拖出对象并重新使用。使用客户端激活的缓冲组件的行为都是相同的。
非托管组件的对象池和事务也如所预期的那样运行(虽然 Visual Basic 6.0 组件不支持对象池)。需要为大多数非托管应用程序通过 COM+ 管理工具设置缓冲和事务属性。
WKO 与 CAO 模型的一个关键区别在于它们向有状态的对象传递引用的能力。以下是 C# ServicedComponent 示例,显示了此操作的基本步骤:using System;using System.Reflection;using System.EnterpriseServices;using System.Runtime.InteropServices;[assembly: ApplicationName("RefPass")][assembly: ApplicationActivation(ActivationOption.Server, SoapVRoot="RefPass")][assembly: AssemblyKeyFile("RefPass.snk")]namespace RefPass{ public interface IParent { string SetRef(object inKid); object GetRef(); string CountUp(object obj); } public interface IChild { string GetValue (); string CountUp(); void SetName(string key); } [ClassInterface(ClassInterfaceType.AutoDual)] public class Parent: ServicedComponent, IParent { protected Child _kid = null; public string SetRef(object inKid) { _kid = (Child)inKid; return _kid.GetValue(); } public object GetRef() { return (object)_kid; } public string CountUp(object obj) { Child kid = (Child)obj; if (kid == null) return _kid.CountUp(); else return kid.CountUp(); } } [ClassInterface(ClassInterfaceType.AutoDual)] public class Child : ServicedComponent, IChild { private int _counter = 0; private string _name = "none"; public string CountUp() { _counter++; return GetValue(); } public string GetValue() { return (_name + " " +_counter.ToString()); } public void SetName(string key) { _name = key; } }}
Ҷƪл˵?
COM+ Web 服务:通过复选框路由到..[05-28]
好的,webservice里能返回datase..[05-28]
在Web Service中实现Transaction[05-28]
Data Integrity in Web Services..[05-28]
Data Integrity in Web Services..[05-28]
很老的文章了,不知道有人贴过没..[05-28]
一并给你回答吧:webservice , s..[05-28]
XML Web Service 基础 (转微软MS..[05-28]
在运行时使用 UDDI (微软)[05-28]
实战Web服务[05-28]
COM+ Web 服务:通过复选框路由到..[05-28]
好的,webservice里能返回datase..[05-28]
在Web Service中实现Transaction[05-28]
Data Integrity in Web Services..[05-28]
Data Integrity in Web Services..[05-28]
很老的文章了,不知道有人贴过没..[05-28]
浅谈SOAP (转)[05-28]
一并给你回答吧:webservice , s..[05-28]
XML Web Service 基础 (转微软MS..[05-28]
在运行时使用 UDDI (微软)[05-28]