`
xianshi_cn
  • 浏览: 14514 次
  • 性别: Icon_minigender_1
  • 来自: 未来
社区版块
存档分类
最新评论

Hibernate Core Migration Guide : 4.0

    博客分类:
  • tec
阅读更多

Hibernate Core Migration Guide : 4.0

VERSION 9  Click to view article history
Created on: Feb 10, 2011 12:39 PM by Steve Ebersole - Last Modified:  Jan 6, 2012 6:07 PM by Steve Ebersole

This document is a work in progress as we develop 4.0

 

  1. Initial move to ServiceRegistry.  For now, see design wikis or sources for more information.  Not all "services" have been migrated to this model yet.  The main ones (JDBC and transaction stuff) as well as lowever level one (classloading and such) have been migrated.  The rest will be moved during Alpha2 development.
  2. In an initial push toward osgi we started splitting up packages a little bit differently in this release. 
    1. The reason is to identify classes which are intended as
      1. public API, which are fully expected to be used in application code.
      2. internal implementation details, which are only intended for Hibernate use.
      3. SPI contracts, whch define
        1. extension contracts
        2. contracts with Hibernate internals exposed to these extensions
    2. This will potentially lead to some  packaging changes needed in user code:
      1. org.hibernate.dialect.resolver.DialectResolver -> org.hibernate.service.jdbc.dialect.spi.DialectResolver
  3. Deprecated methods that have been removed:
    1. References to org.hibernate.type.AbstractSingleColumnStandardBasicType and org.hibernate.type.SingleColumnType methods should be changed as indicated:
      1. nullSafeGet(ResultSet rs, String name) should be changed to 
        nullSafeGet(ResultSet rs, String name, SessionImplementor session)
      2. get(ResultSet rs, String name) should be changed to 
        get(ResultSet rs, String name, SessionImplementor session)
      3. nullSafeSet(PreparedStatement st, T value, int index) should be changed to nullSafeSet(PreparedStatement st, Object value, int index, SessionImplementor session)
      4. set(PreparedStatement st, T value, int index) should be changed to set(PreparedStatement st, T value, int index, SessionImplementor session)
    2. References to org.hibernate.usertype.UserType methods should be changed as indicated:
      1. nullSafeGet(ResultSet rs, String[] names, Object owner) should be changed to   
        nullSafeGet(ResultSet rs, String[] names, SessionImplementor session, Object owner)
      2. nullSafeSet(PreparedStatement st, Object value, int index) should be changed to nullSafeSet(PreparedStatement st, Object value, int index, SessionImplementor session)
    3. Session.reconnect() - manual disconection and reconnection is now only supported for user-supplied-connection scenarios (JDBC Connection passed in while opening the Session)
    4. Session.connection() - use Session.doWork(), Session.doReturningWork() or Session.sessionWithOptions()...openSession() as replacement depending on need
    5. Most of the overloaded SessionFactory.openSession methods.  Use SessionFactory.withOptions()...openSession() instead
  4. Deprecated classes/interfaces that have been removed:
    1. org.hibernate.classic.Session
    2. org.hibernate.classic.Validatable
    3. org.hibernate.classic.ValidationException
  5. org.hibernate.jdbc.BatcherFactory, Batcher, and their implementations have been replaced by org.hibernate.engine.jdbc.batch.spi.BatchBuilder and Batch, with default implementations in org.hibernate.engine.jdbc.batch.internal. You can override the default BatchBuilder by defining the  "hibernate.jdbc.batch.builder" property as the name of a BatchBuilder implementation, or by providing a BatchBuilder in a custom ServiceRegistry.
  6. hibernate.cfg.xml no longer supported as means of specifying listeners.  New approach invloves using an org.hibernate.integrator.spi.Integrator which works based on "service discovery". 

 

Note that MetadataSources and classes in org.hibernate.metamodel in general and unfinished and should not be used by users. The current target is to finish this work for Hibernate Core 4.1

分享到:
评论
1 楼 lintghi 2012-05-05  

相关推荐

    Samsung_Data_Migration_Setup_4.0.0.18.exe

    Samsung_Data_Migration_Setup_4.0.0.18.exe

    Hibernate ORM 5.3.7.Final User Guide

    Hibernate ORM是一款为Java环境提供的对象/关系映射(Object/Relational Mapping, ORM)解决方案。它主要解决的问题是将对象模型表示的数据映射到关系数据库模型表示的数据,以及将Java数据类型映射到SQL数据类型。...

    Android代码-openapi-generator

    :bangbang: To migrate from Swagger Codegen to OpenAPI Generator, please refer to the migration guide :bangbang: :notebook_with_decorative_cover: For more information, please refer to the Wiki page and...

    VR-Forces Migration Guide

    VR-Forces Migration Guide 本Migration Guide旨在帮助用户迁移到VR-Forces Version 4.7。该指南将指导用户完成迁移过程,并提供了相关的技术支持。 首先,VR-Forces是由VT MAK开发的一款虚拟现实软件,主要用于...

    AutoCAD 2000 Migration Guide

    ### AutoCAD 2000 迁移指南关键知识点解析 #### 一、AutoCAD 2000 迁移指南概述 AutoCAD 2000 迁移指南是一份由 Autodesk 公司发布的文档,旨在帮助用户从早期版本(如 AutoCAD R14)平滑地过渡到 AutoCAD 2000。...

    yii2-migration:Yii 2 composer 模块迁移助手

    Yii 2 依赖迁移这是一个小的... "post-install-cmd": "ivanovyordan\\migration\\Migration::migrate","post-update-cmd": "ivanovyordan\\migration\\Migration::migrate"用法为您要重用的所有模块创建包。 为需要迁移

    OpenNI_Migration_Guide

    ### OpenNI 迁移指南知识点概述 #### 一、引言与范围 **OpenNI迁移指南**主要面向那些已经使用过早期版本(如OpenNI 1.5)的开发者们,帮助他们顺利过渡到OpenNI/NiTE 2。这份文档的版本为1.1,发布于2013年4月。...

    vxworks_5.5_migration_guide_6.6

    《VxWorks 5.5 to 6.6 Migration Guide》是Wind River公司为帮助开发者将基于VxWorks 5.5系统应用平滑迁移到VxWorks 6.6平台而编写的官方文档。VxWorks是一款广泛应用于实时操作系统(RTOS)领域的嵌入式系统,其...

    BusinessObjects 6.x to XI Release 2 Migration Guide

    BusinessObjects 6.x to XI Release 2 Migration Guide是英文版本的,中文版本可以找我要

    xen 4.0 最新源码 xen 4.0 最新源码

    4. **实时迁移**(Live Migration):Xen 4.0的实时迁移功能允许在不中断服务的情况下将运行中的虚拟机从一个主机迁移到另一个主机,这对于负载均衡和维护操作至关重要。 5. **安全增强**:Xen 4.0引入了更强的安全...

    Range Migration Algorithm:范围迁移算法的SAR示例-matlab开发

    范围迁移算法(Range Migration Algorithm,RMA)是一种用于 SAR(Synthetic Aperture Radar,合成孔径雷达)图像处理的关键技术,旨在纠正由于雷达系统运动引起的距离徙动问题,从而提高成像质量和分辨率。...

    php7-migration-guide:工作正在进行中

    ...这次升级带来了诸多性能提升和语法改进,为开发者提供了更高效、更安全的编程环境。... ... ...这得益于全新的 Zend Engine 3,其优化了内存管理,减少了内存消耗,并提升了执行效率。...5. **新语法:`void`和`list()`**:`...

    jbpm修改后的jar包

    (DTDEntityResolver.java:73) - recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!...

    WF 4.0 入门经典

    10. **版本管理和迁移(Versioning and Migration)**:WF 4.0支持工作流的版本升级,允许在不中断现有工作流实例的情况下部署新版本。 书中的“Beginning WF Windows Workflow in .NET 4.0.pdf”很可能详细讲解了...

    MigrationTools:将计算机的NSS配置迁移到LDAP

    本篇文章将详细解释如何使用MigrationTools来迁移计算机的NSS配置到LDAP,以及涉及到的相关技术知识。 首先,NSS是一种在Linux和Unix系统中用于管理用户、群组和其他系统资源的接口。它允许系统管理员选择多种数据...

    SQL Server Migration Assistant 2005 for Oracle V4.0迁移工具

    SQL Server Migration Assistant 2005 for Oracle V4.0 版本是针对Oracle数据库到SQL Server 2005的迁移特别定制的,它提供了高效、自动化的方法来评估和转换Oracle数据库的对象和数据,以适应SQL Server的环境。...

    websphere mq v7 migration guide

    ### WebSphere MQ V7 迁移指南核心知识点详解 #### 一、引言:WebSphere MQ V7 迁移概述 - **版本介绍**:WebSphere MQ Version 7.0 是 IBM 公司推出的一款消息中间件软件,用于在分布式环境中实现应用程序之间的...

    yii2-rbac-migration:用于 RBAC 迁移的 Yii2 扩展

    "rmrevin/yii2-rbac-migration": "1.1.*" } } 用法 创建新的迁移扩展 \rmrevin\yii\rbac\RbacMigration 并作为正常迁移执行 <? // ... class m140217_201400_rbac extends \rmrevin\yii\rbac\ RbacMigration {...

Global site tag (gtag.js) - Google Analytics