-
Notifications
You must be signed in to change notification settings - Fork 936
Description
codekaizen created an issue — 4th July 2013, 1:27:58:
EXPECTED:
Setting "command_timeout" in the Configuration properties affects commands created from the so configured session factory.OBSERVED:
Setting "command_timeout" in the Configuration has no effect when usingSqlClientBatchingBatcher
, and instead the command timeout is read from the globalEnvrionment.Properties
values.Rationale:
Setting defined properties on a per-Configuration basis should affect the outcome of dependent factories created from the Configuration instance. This is just the least surprising thing to do, since that is the purpose of the Configuration object. Since an
IBatcherFactory
is created from aSessionFactory
, it should obey the same configuration, not exclusively the global configuration. Other developers have discovered the same problem independently (http://ronaldrosiernet.azurewebsites.net/Blog/2013/04/20/timeout_in_nhibernate_batched_sessions)Notes to implementors:
It would seem to me that
SessionFactory.CreateBatcherFactory
should do some detection on the ctor of theIBatcherFactory
implementation, or else have some kind ofInit
method which gets the Settings instance down to the batcher factory on a per-sessionfactory basis. TheIBatcherFactory
could then pass the Settings instance down to the actualIBatcher
which can make use of the configured properties.