[fpc-pascal] Threaded webserver and TJSONRPCModule instances: can I be sure there's only one?

Luca Olivetti luca at ventoso.org
Fri Oct 21 09:57:11 CEST 2022


El 21/10/22 a les 9:48, Luca Olivetti via fpc-pascal ha escrit:
> El 21/10/22 a les 9:39, Michael Van Canneyt via fpc-pascal ha escrit:
> 
>> And a property of your module:
>>
>>   property Kind: TWebModuleKind read FWebModuleKind write 
>> FWebModuleKind default wkPooled;
>>
>> wkPooled is the default, but if you explicitly set this to 'wkPooled' 
>> in the constructor, you'll be sure there is only ever 1 instance of 
>> the module, which is reused for every request...
> 
> Thank you,
> 
> I see that the property isn't published, so it's not available in the 
> object inspector.
> Can I set it in the DataModuleCreate os is it too late?

I overrode the CreateNew method, I hope that's enough.

Bye
-- 
Luca


More information about the fpc-pascal mailing list