I am using castle activerecord to persist my domain objects to a sql server database. If for whatever reason the database connection fails i need to be able to ignore it and carry开发者_JS百科 on with the opperation of the program.
You can't ignore connection errors. It's up to you to decide what to do in case of a connection failure. For example, if you query for some User entities and there's a connection error, what should NHibernate/ActiveRecord return? It can't possibly make up results.
If you're working with an occasionally connected scenario, see this question.
精彩评论