home *** CD-ROM | disk | FTP | other *** search
- unit RDataMod;
- interface
- uses
- Windows, Messages, SysUtils, Classes, ComServ, ComObj, VCLCom, DataBkr,
- DBClient, TDM60_TLB, StdVcl;
-
- type
- TPoolingMidasServer = class(TRemoteDataModule, IPoolingMidasServer)
- private
- { Private declarations }
- protected
- class procedure UpdateRegistry(Register: Boolean; const ClassID, ProgID: string); override;
- public
- { Public declarations }
- end;
-
- implementation
-
- {$R *.DFM}
-
- class procedure TPoolingMidasServer.UpdateRegistry(Register: Boolean; const ClassID, ProgID: string);
- begin
- if Register then
- begin
- inherited UpdateRegistry(Register, ClassID, ProgID);
- EnableSocketTransport(ClassID);
- EnableWebTransport(ClassID);
- RegisterPooled(ClassID,10,42); // max. 10 instances, timeout = 42 minutes
- end else
- begin
- UnregisterPooled(ClassID);
- DisableSocketTransport(ClassID);
- DisableWebTransport(ClassID);
- inherited UpdateRegistry(Register, ClassID, ProgID);
- end;
- end;
-
- initialization
- TComponentFactory.Create(ComServer, TPoolingMidasServer,
- Class_PoolingMidasServer, ciMultiInstance, tmApartment);
- end.
-