摘要:
中间层服务对象全部作成对象池,因此中间层负载能力非常强大。所有池中的对象都是针对事件而不是某一个客户端。当一个事件执行完成,它所使用的对象会立即放回池中,以等待其它事情发生时再使用。对象只有在事件发生的那一瞬间被占用,这样对象的使用效率是很高的。 阅读全文
摘要:
unit MidServer_TLB;// ************************************************************************ //// WARNING // ------- // The types declared in this file were generated from data read from a // Type Library. If this type library is explicitly or indirectly (via // another type library referring to t 阅读全文
摘要:
unit uMain;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, TlHelp32, ExtCtrls, DB, DBClient, Grids, DBGrids, ADODB, Provider, AppEvnts;type TForm1 = class(TForm) DataSource1: TDataSource; DBGrid1: TDBGrid; QryPooling: TADOQuery; DataSetProv 阅读全文
摘要:
unit uDM;interface{$WARN SYMBOL_PLATFORM OFF}uses SysUtils, Classes, Controls,DB, DBClient, MConnect, SConnect, Dialogs, Variants, ADODB, IniFiles, Forms, MidServer_TLB, uFun;type TSvrRec = record // socketConnection's property Address: string; Port: Integer; ServerName: string; end; Tdm = class 阅读全文
摘要:
unit uFun;interfaceuses SysUtils, Variants, db, adodb, Classes, EncdDecd;function ParametersToVariant(par:TParameters): OleVariant;procedure VariantToParameters(input:OleVariant;par:TParameters);function ParamsToVariant(par:TParams): OleVariant;procedure VariantToParams(input:OleVariant;par:TParams) 阅读全文
摘要:
unit uTestSvr;{$WARN SYMBOL_PLATFORM OFF}interfaceuses Windows, Messages, SysUtils, Classes, ComServ, ComObj, VCLCom, DataBkr, DBClient, MidServer_TLB, StdVcl, DB, ADODB, Provider, Variants, Forms, ThreadComLib;type TsvrDM = class(TRemoteDataModule, ITest) private { Private declarations } function G 阅读全文
摘要:
// TThreadedClassFactory.Create (ComServer, TsvrDM, CLASS_Test, // create com thread pooling// ciMultiInstance);unit ThreadComLib;{$IFDEF VER100}{$DEFINE D3}{$ENDIF}interfaceuses Windows, ActiveX, Classes, ComObj, Controls, ExtCtrls, Grids, Variants, VCLCom, forms ;{ General COM threading types }typ 阅读全文
摘要:
unit ProcPool;interfaceuses Classes, Windows, SysUtils, ADODB, forms;type TProcPool = class(TObject) private FObjList:TThreadList; FTimeout: Integer; FMaxCount: Integer; FSemaphore: Cardinal; function CreateNewInstance(List:TList): TADOStoredProc; function GetLock(List:TList;Index: Integer): Boolean 阅读全文
摘要:
unit DSPPool;interfaceuses Classes, Windows, SysUtils, Provider, forms;type TDSPPool = class(TObject) private FObjList:TThreadList; FTimeout: Integer; FMaxCount: Integer; FSemaphore: Cardinal; function CreateNewInstance(List:TList): TDatasetProvider; function GetLock(List:TList;Index: Integer): Bool 阅读全文
摘要:
unit AdoqueryPool;interfaceuses Classes, Windows, SysUtils, ADODB, forms;type TADOQueryPool = class(TObject) private FObjList:TThreadList; FTimeout: Integer; FMaxCount: Integer; FSemaphore: Cardinal; function CreateNewInstance(List:TList): TADOQuery; function GetLock(List:TList;Index: Integer): Bool 阅读全文