H
hbsbx
Unregistered / Unconfirmed
GUEST, unregistred user!
在MIDAS应用中,一说到pooler,各位就让参考
MIDAS下的pooler的demo,但我在查问delphi帮助
时发现它说到用:
RegisterPooled(const ClassID: string;
Max, Timeout: Integer;
Singleton: Boolean = False);
就可实现,用法如下:
class procedure TMyRDM.UpdateRegistry(Register: Boolean;
const ClassID, ProgID: string);
begin
if Register then
begin
inherited UpdateRegistry(Register, ClassID, ProgID);
{ EnableSocketTransport(ClassID);
}
EnableWebTransport(ClassID);
RegisterPooled(ClassID, 16, 30);
//此行
end else
begin
{ DisableSocketTransport(ClassID);
}
DisableWebTransport(ClassID);
UnregisterPooled(ClassID);
inherited UpdateRegistry(Register, ClassID, ProgID);
end;
end;
delphi帮助的说明如下:
In Delphi applications, to enable remote data module instances to be pooled,
call RegisterPooled from the UpdateRegistry method of a remote data module
class. When data module instances are pooled, the server maintains a cache of
remote data module instances. Each client request is serviced by the first
available instance from that cache. Because instances are shared, the remote
data module can't rely on persistent state information.
我的问题是:
1、用此方法实现起来这么简单,为什么在demo不用?
2、此法真的可以实现pool功能吗?有没有问题呢?
MIDAS下的pooler的demo,但我在查问delphi帮助
时发现它说到用:
RegisterPooled(const ClassID: string;
Max, Timeout: Integer;
Singleton: Boolean = False);
就可实现,用法如下:
class procedure TMyRDM.UpdateRegistry(Register: Boolean;
const ClassID, ProgID: string);
begin
if Register then
begin
inherited UpdateRegistry(Register, ClassID, ProgID);
{ EnableSocketTransport(ClassID);
}
EnableWebTransport(ClassID);
RegisterPooled(ClassID, 16, 30);
//此行
end else
begin
{ DisableSocketTransport(ClassID);
}
DisableWebTransport(ClassID);
UnregisterPooled(ClassID);
inherited UpdateRegistry(Register, ClassID, ProgID);
end;
end;
delphi帮助的说明如下:
In Delphi applications, to enable remote data module instances to be pooled,
call RegisterPooled from the UpdateRegistry method of a remote data module
class. When data module instances are pooled, the server maintains a cache of
remote data module instances. Each client request is serviced by the first
available instance from that cache. Because instances are shared, the remote
data module can't rely on persistent state information.
我的问题是:
1、用此方法实现起来这么简单,为什么在demo不用?
2、此法真的可以实现pool功能吗?有没有问题呢?