iirc i had this issue before but i changed a TROPooledClassFactory from PreinitializePool from FALSE to TRUE and now i get a runtime error running the serverapp..
it crashed somewhere in the create of the dataabstract service - can’t pinpoint it due to the magnificent failing of the debugger in delphi…
i do have other preinitialized DAservices that get created in the same way before the one that crashes so i have no real idea what is going on
the only thing i added is a macro function in the DataAbstractServiceAfterAcquireConnection like
var mac:IDAHasMacroProcessor;
if Supports(aAcquiredConnection, IDAHasMacroProcessor, mac) then
mac.GetMacroProcessor.RegisterProc(‘CheckBitwise’, CheckBitwise, 2);
AFAIK, Delphi uses one global critical section for all TReader/TWriter calls…
try to remove BusinessRulesID from .dfm and assign BusinessRulesID in Create manually.
and i don’t see a way around the order of units in the dpr if you have a specific businessrules unit that registers itself if that unit hasn’t been able to register itself…
that rather limits the preinitializepool option…
setting the businessrulesid in the create event does not solve that problem
if i remove the businessrulesid from the component in design time AND the implementing unit is not streamed in before the DAservice (at which point the RegisterBusinessProcessorRules did not register the name used) AND setting the businessrulesid of the businessrules component in the DataAbstractServiceCreate event, that will result in a businessrulesID not found exception (with the advantage that that one does surface normally as an error instead of runtime error xxx
i guess it has to do with DA code that when created checks for the existence of the implementing businessrulesid class when the component is created
potentially it could just assume that it will be present (lazy binding) instead of enforcing it, but then the error would surface at runtime
i can live with respecting the order of units, it was just really unclear what the cause was and again, the delphi debugger is quite bad to dig deep into source