We use Fluent NHibernate
with SQL server 2008. I need NHibernate
to use my custom DbCommand
class (inherited from IDbCommand
). In this custom DbCommand
class, I want to handle transient errors (e.g. any transient network errors etc...) and retry the same command certain number of times before failing.
I know, Microsoft provides Transient Fault handling block (with methods like SqlConnectionExtensions
.OpenWithRetry and similar method for retriable ExecuteNonQuery
) for handling transient errors but, I guess it is specific to Windows Azure platform.
Let me know if NHibernate
provides any mechanism for injecting custom behaviours.