posts - 4, comments - 5, trackbacks - 0, articles - 10

          spring事務最佳實踐

          Posted on 2005-11-23 10:55 勇敢的心 閱讀(219) 評論(0)  編輯  收藏

          A good starting point for a small application with a couple of transactional business objects is the TransactionProxyFactoryBean. This option is easy to configure and provides enough flexibility for most needs.

          For applications with several business classes that need transaction demarcations, we recommend using a parent/child setup . You specify a TransactionProxyFactoryBean as an abstract parent bean that has the base definitions. You can then easily reference this parent bean for any class that needs to have transactions applied without repeating all the configuration settings for all the classes.

          If you have a really large application with many business objects, then you should consider using an auto-proxying solution. This includes both the BeanNameAutoProxyCreator and the DefaultAdvisorAutoProxyCreator mentioned earlier.

          Annotations are going to see increased use once J2SE 5.0 is in widespread use. We believe that at that point, the annotation solutions discussed earlier in this chapter often will replace the other solutions entirely based on external bean configuration files.


          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 巴林右旗| 北京市| 鹤岗市| 大厂| 海原县| 云梦县| 双辽市| 攀枝花市| 通河县| 吉木萨尔县| 壤塘县| 灵台县| 扬中市| 庆云县| 凤山市| 若羌县| 镇原县| 甘谷县| 梓潼县| 万盛区| 柘荣县| 汾西县| 石嘴山市| 青川县| 新津县| 德化县| 垣曲县| 雷波县| 黄骅市| 金阳县| 保定市| 蓝山县| 读书| 邓州市| 墨玉县| 博湖县| 鞍山市| 浦江县| 上蔡县| 琼结县| 万全县|