How to clear the ODP.NET connection pool on connection errors?

后端 未结 2 710
清歌不尽
清歌不尽 2020-12-31 06:40

I\'m using NHibernate and ODP.NET to connect to a Oracle 11g database. Of course there can be connection errors (network failure, DB down, ...). I\'m handling all these exce

2条回答
  •  [愿得一人]
    2020-12-31 07:23

    Generally speaking, you should avoid trying to manipulate the connection pool for any ADO.NET provider (and also WCF channels - an aside). If you application needs to be resilient in the face of underlying data errors (e.g. timeouts, broken connections in pool, etc.) then you should implement the appropriate level of transaction to ensure data integrity and retry logic to re-execute the failed operation.

提交回复
热议问题