<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    MDA/MDD/TDD/DDD/DDDDDDD
    posts - 536, comments - 111, trackbacks - 0, articles - 0
      BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理

    grails與jdbc

    Posted on 2010-05-23 04:57 leekiang 閱讀(547) 評論(0)  編輯  收藏 所屬分類: grails

    因為要處理遺留代碼,需要在 gog 中使用手工事務, 在 resources.groovy 中進行如下定義后

    1. testDataSourceTxManager(DataSourceTransactionManager){??
    2. ????dataSource?=?ref('dataSource')??
    3. }??

    ?發現 service 中的事務沒了。

    ?查了一下 Grails 的源碼, 原來 grails 在進行事務管理器查找的時候,并不是用的 bean 名字去查找,而是查找 所有 是 TransactionManager 實例 的 Bean, 并從得到的數組中 取第一個作為事務管理器。

    ?因此要使用 spring 的 DataSourceTransactionManager 的, 就不能將這個 Manager 在 Context 中定義了。只能通過自己 new 一個 單例的 DataSourceTransactionManager, 然后將 DataSource 傳入,這樣就可以用了..........

    來源:http://phoenix-clt.javaeye.com/blog/430400


    http://osdir.com/ml/lang.groovy.grails.user/2008-04/msg00663.html

    How to operate the partition table with Hibernate & GORM

    Sorry I had been on a business trip for a few days
    Although the Hibernate Shards has some urgent limitations, like 'Cross-Shard
    Object Graphs' , it is a wonderful solution for this. But the Hibernate
    Shards has implemented its own Session/SessionFactory(etc.), maybe bring
    GROM some troubles.

    Thanks for your reply. And to look forward to that GROM can support
    Hibernate Shards.


    To take an advantage of the Spring JDBC Template for any Grail application, the first thing you need to do, is to define the DataSource bean in resources.groovy , Don't forget to have the jdbc driver(.jar) corresponding to your backend database server under the lib folder of your grail application.


    http://www.rimple.com/tech/2010/3/25/calling-postgresql-stored-procedures-from-grails-part-1-the.html

    http://m.tkk7.com/rain1102/archive/2008/07/18/215891.html


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


    網站導航:
     
    主站蜘蛛池模板: 中文字幕亚洲精品| 久久亚洲精品国产精品黑人| 国产成人精品亚洲2020| 免费毛片a在线观看67194| 亚洲一区在线视频观看| 精品熟女少妇AV免费观看| 7777久久亚洲中文字幕| 在线视频免费观看www动漫| 久久亚洲中文字幕无码| 亚洲av日韩片在线观看| 一级有奶水毛片免费看| 亚洲av无码一区二区乱子伦as| 人妻在线日韩免费视频| 亚洲精品视频免费看| 久久久www成人免费毛片| 亚洲GV天堂GV无码男同| 免费一级特黄特色大片在线 | 亚洲精品在线免费看| www视频在线观看免费| 亚洲人成色777777老人头| 亚洲av无码不卡私人影院| 最近免费中文字幕MV在线视频3| 亚洲宅男永久在线| 可以免费看的卡一卡二| 美美女高清毛片视频黄的一免费| 久久久久亚洲AV成人网| 95老司机免费福利| 亚洲AV日韩AV无码污污网站| 久久久久噜噜噜亚洲熟女综合| 99视频精品全部免费观看| 亚洲AV网一区二区三区| 亚洲VA中文字幕无码一二三区| 免费99精品国产自在现线| 免费人妻精品一区二区三区| 亚洲狠狠久久综合一区77777| 最近最新中文字幕完整版免费高清 | 国产午夜精品久久久久免费视| 亚洲一区在线视频| 国产中文在线亚洲精品官网| 亚洲第一网站免费视频| 免费无遮挡无码视频在线观看|