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

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

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

    OMG,到底在尋找什么..................
    (構造一個完美的J2EE系統(tǒng)所需要的完整知識體系)
    posts - 198,  comments - 37,  trackbacks - 0
    Spring 1.1+Hibernate 2.1換成 
    Spring 1.2+Hibernate 3.0的組合

    轉換的注意事項的話我發(fā)現下面這篇post寫得蠻完整的,我個人試過,可以順利轉換

    (1) Hibernate3 SessionFactoryUtils doesn't call "setReadOnly(true)" anymore。這個會影響到

    open session in view filter,與原來的行為不大一樣 (算是修正 bug),如果有使用這個 filter 的話,最好稍微測一下。

    (2) 如果有用 Acegi 的人,Spring 1.2 要搭配最新的 0.8.2 版才行。

    (3) Hibernate 3 的 reference 比之 2 的又更上一層樓,值得細讀。

    (4) 自 Spring 1.1.4 開始,多了個 LazyConnectionDataSourceProxy,用來 lazy 存取 connection (直到真正動到 DB 了才會連線)

    (5) HibernateException 變成 unchecked exception 了,不過不代表可以不處理直接丟出去,你還是得乖乖的用

    hibernateTemplate 幫你包裝。













    I make use of Hibernate metadata as well as Spring. Here's my list of all the changes I had to make to run my application with HB3 on WebLogic. This may repeat some of this information above and is not meant to be exhaustive. 1. global replace net.sf.hibernate to org.hibernate (be sure to include the XML configuration files as well) 2. global replace org.springframework.orm.hibernate to org.springframework.orm.hibernate3 (be sure to include the XML configuration files as well) 3. global replace net.sf.hibernate.expression.Expression to org.hibernate.criterion.Expression 4. global replace net.sf.hibernate.expression.Order to org.hibernate.criterion.Order 5. convert method call getHibernateTemplate.getNamedQuery(Session sess, String query) to session.getNamedQuery(String query) 6. convert method call getHibernateTemplate().createCriteria(session, getReferenceClass()) to session.createCriteria(getReferenceClass()) 7. Add new EntityMode.POJO parameter as follows to: ClassMetadata.getPropertyValue(dest, SkipFields.TCN.toString().substring(1), EntityMode.POJO) 8. Add new EntityMode.POJO parameter as follows to: classMetadata.getMappedClass(EntityMode.POJO) 9. global replace HibernateProxyHelper.getClass(object) to HibernateProxyHelper.getClassWithoutInitializingProxy(object); 10. Convert method call: propertyTypes.isPersistentCollectionType()) to propertyTypes.isCollectionType()) 11. Update the DTD as follows: <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> 12. Replace in the HBM files any instance of “<generator class=”vm” /> to of “<generator class=”native” /> 13. Add lazy=”false” to any class or association if you don’t use to use lazy initialization. However, this is strongly discouraged and thus why the default is now set to true. 14. Caching is now enabled by default using the EHCache. If you want to disable this, you must do this from the hibernate.cfg.xml. Again, this is strongly discouraged. 15. Remove all the previous versions of the .jars associated with Hibernate and replace them with the new versions. 16. On BEA, you have to move antlr-2.7.5H3.jar to the PRE_CLASSPATH of the server to run inside BEA because BEA includes this tool in their system classpath that is inconsistent.
    posted on 2006-03-28 17:01 OMG 閱讀(368) 評論(0)  編輯  收藏 所屬分類: Hibernate

    <2006年3月>
    2627281234
    567891011
    12131415161718
    19202122232425
    2627282930311
    2345678

    常用鏈接

    留言簿(1)

    隨筆分類

    隨筆檔案

    IT風云人物

    文檔

    朋友

    相冊

    經典網站

    搜索

    •  

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 亚洲无码视频在线| 国产三级免费电影| 亚洲精品高清视频| 国产免费播放一区二区| 亚洲国产V高清在线观看| 免费福利资源站在线视频| 午夜国产大片免费观看| 免费看一级高潮毛片| 亚洲国产综合无码一区二区二三区| 久久精品熟女亚洲av麻豆| 国产免费爽爽视频免费可以看| 亚洲AV无码之国产精品| 全部免费a级毛片| 国产精品九九久久免费视频| 亚洲人成网站在线播放vr| 十八禁无码免费网站| 精品亚洲成在人线AV无码| 午夜成年女人毛片免费观看| 美女视频黄频a免费大全视频| 亚洲国产精品自在拍在线播放| 精品一区二区三区高清免费观看| 国产亚洲精品一品区99热| 日韩午夜理论免费TV影院| 亚洲人成日本在线观看| 天天摸夜夜摸成人免费视频| 曰批免费视频播放免费| 亚洲一区精品伊人久久伊人| 国产精品免费无遮挡无码永久视频| 亚洲第一区视频在线观看| 四虎影院免费视频| caoporm超免费公开视频| 亚洲美女视频网址| 国产区卡一卡二卡三乱码免费| 中文字幕在线免费看| 亚洲成a人片毛片在线| 免费不卡中文字幕在线| 久久精品国产这里是免费| 亚洲精品无码久久久久APP| 在线观看亚洲精品国产| 日韩欧毛片免费视频| 一级成人毛片免费观看|