我們有舊的元件(Workflow),連接DB是透過自行封裝 Ado.NET 的元件,
而到新開發的系統,則是使用 Spring.NET + NHibernate 。
當新、舊交雜在一起使用時,交易該如何控管呢?
最簡單的就是用 TransactionScope 去包起來,
但這時候 MSDTC 就跑起來了。
但是很多單位現在都不給開 MSDTC 了,
那要怎麼辦呢? 取得 DB Connection 及 Transaction 往內傳嗎?
要如何取得 Spring.NET 中的 System.Data.Common.DbTransaction 物件呢?
2017-02-24
2016-05-23
[.NET]Could not get ADO.NET connection. ---> System.Data.SqlClient.SqlException: Timeout expired.
最近同事詢問有一支 .NET Console 程式跑一跑後,
就會出現以下的錯誤,
Spring.Data.CannotGetAdoConnectionException: Could not get ADO.NET connection. ---> System.Data.SqlClient.SqlException: Timeout expired.
2011-05-27
AOP Using Spring.NET
閱讀CodeProject的AOP Using Spring.NET(Part 1 , Part 2)整理下來。
2011-05-25
Dependency Injection using Spring.NET
Dependency Injection using Spring.NET
- 1