My Software,My Dream—Forge a more perfect NMS product.
原來我們都是在new dao時,同時獲得一個Connection DaoInterface dao = new XxxxDao();
為什么新架構把Connection放在dao之外呢?為了實現事務。 當一個事務需要調用兩個dao中兩個(以上)方向時,如果出錯, 只有同一個Connection才能實現rollback。 DaoInterface dao = new XxxxDao(connection);
posted on 2007-05-01 13:10 afunms 閱讀(132) 評論(0) 編輯 收藏
We'd much rather change the world instead of going along with it.
Powered by: BlogJava Copyright © afunms