`
小嘴冰凉
  • 浏览: 448093 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

sql2000与sql2005的hibernate-configuration

阅读更多
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-configuration
    PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
    "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
    
<hibernate-configuration>
	<session-factory>
		<!-- local connection properties -->
		<property name="hibernate.connection.url">
			jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=t <!-- sql 2000 -->
			<!-- jdbc:sqlserver://localhost:1433;DatabaseName=t  sql 2005-->
		</property>
		<property name="hibernate.connection.driver_class">
			com.microsoft.jdbc.sqlserver.SQLServerDriver <!-- sql 2000 -->
			<!-- sql 2005 com.microsoft.sqlserver.jdbc.SQLServerDriver -->
		</property>
		<property name="hibernate.connection.username">sa</property>
		<property name="hibernate.connection.password">sa</property>
		<!-- property name="hibernate.connection.pool_size"></property -->
		<!-- dialect for DB2 --><!--
		<property name="dialect">
			org.hibernate.dialect.DB2Dialect
		</property>
		--><property name="hibernate.show_sql">true</property>
		<property name="hibernate.transaction.factory_class">
			org.hibernate.transaction.JDBCTransactionFactory
		</property>
		<mapping resource="Person.hbm.xml" />
	</session-factory>
</hibernate-configuration>


分享到:
评论
1 楼 yinsuxiaokucha 2008-09-16  

相关推荐

    Hibernate开发jar包

    "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd"&gt; &lt;hibernate-configuration&gt; &lt;session-factory&gt; &lt;!-- 必须配置 --&gt; &lt;property name="hibernate.connection.driver_class"&gt;...

    hibernate配置

    "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"&gt; &lt;hibernate-configuration&gt; &lt;!--Hibernate配置的根节点--&gt; &lt;session-factory&gt; &lt;!--配置SessionFactory--&gt; &lt;property name="dialect"&gt;...

    Hibernate1

    "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd"&gt; &lt;hibernate-configuration&gt; &lt;session-factory&gt; &lt;!-- Database connection settings --&gt; &lt;property name="connection.driver_class"&gt;...

    Hibernate配置各种数据源详解

    &lt;hibernate-configuration&gt; &lt;session-factory&gt; &lt;!– 各属性的配置–&gt; &lt;!—为true表示将Hibernate发送给数据库的sql显示出来 –&gt; ”show_sql”&gt;true &lt;!– SQL方言,这边设定的是MySQL –&gt; ”dialect”&gt;...

    车间信息管理lxf_GraduationProject

    DOCTYPE hibernate-configuration (View Source for full doctype...)&gt; - &lt;!-- Generated by MyEclipse Hibernate Tools. --&gt; - &lt;hibernate-configuration&gt; - &lt;session-factory&gt; ...

    三步完成Hibernate + sql server200 + proxool连接池

    第一步:hibernate.cfg.xml 加入: &lt;property name="hibernate.proxool.pool_alias"&gt;dbpool&lt;/property&gt; &lt;property name="hibernate.proxool.xml"&gt; ProxoolConf.xml &lt;/property&gt; ...

    Hibernate3使用经验

    2.通过Hibernate执行SQL 2.1 创建session Configuration config = new Configuration(); config.configure(); SessionFactory sf = config.buildSessionFactory(); Session session = sf.openSession();

    Hibernate事件框架之拦截器使用源代码

    使用拦截器时按如下步骤进行: (1)定义实现Interceptor接口的拦截器类 (2)通过Session启用拦截器,或者通过Configuration启用全局拦截器请看示例代码

    Hibernate体系结构的概要图

    Session接口 Session接口负责执行被持久化对象的CRUD操作(CRUD的任务是完成与数据库的交流,包含了很多常见的SQL语句。)。但需要注意的是Session对象是非线程安全的。同时,Hibernate的session不同于JSP应用中的...

    hibernate.properties

    ## DO NOT specify hibernate.connection.sqlDialect ## InterClient #hibernate.connection.driver_class interbase.interclient.Driver #hibernate.connection.url jdbc:interbase://localhost:3060/C:/firebird...

    第24次课-1 Spring与Hibernate的整合

    第24次课-1 Spring与Hibernate的整合 本节主要内容 24.1 概述 24.2 管理SessionFactory 24.3 Spring对Hibernate的简化 24.1 概述 24.1.1 概述 Spring提供了很多IoC特性的支持,方便处理大部分典型的Hibernate整合...

    Hibernate Reference Documentation3.1

    1.2.3. Hibernate configuration 1.2.4. Building with Ant 1.2.5. Startup and helpers 1.2.6. Loading and storing objects 1.3. Part 2 - Mapping associations 1.3.1. Mapping the Person class 1.3.2. A ...

    hibernate 完整教程 自学

     Configuration接口负责配置并启动Hibernate,创建SessionFactory对象。在Hibernate的启动的过程中,Configuration类的实例首先定位映射文档位置、读取配置,然后创建SessionFactory对象。 Transaction接口  ...

    Hibernate使用技巧汇总

    property-ref:关联类中用于与主控类相关联的属性名,默认为关联类的主键属性名 单向一对多需在一方配置,双向一对多需在双方进行配置 8.lazy=false:被动方的记录由hibernate负责记取,之后存放在主控...

    jdbc基础和参考

    3.hibernate的配置文件(hibernate.cfg.xml)得存在 4.POJO.hbm.xml文件存在 5.hibernate的jar包以及数据库的驱动包存在 Hibernate的编程: 1.构建Configuration对象读取配置文件 2.读取映射文件 3.构建SessionFactory...

    基于J2EE框架的个人博客系统项目毕业设计论文(源码和论文)

     SQL Server 2000与以前版本相比较,又具有以下新特性 :  1.支持XML(Extensive Markup Language,扩展标记语言)  2.强大的基于Web的分析  3.支持OLE DB和多种查询  4.支持分布式的分区视图  安装、...

    DDLGenerator:从 JPA+Hibernate 项目创建 DDL 文件的 Maven 插件

    一个 Maven 插件,用于从 JPA+Hibernate 项目创建 DDL 文件。 用法 只需在pom.xml添加以下配置: &lt;groupId&gt;net.ggtools.maven&lt;/groupId&gt; &lt;artifactId&gt;ddlgenerator-maven-plugin &lt;version&gt;0.1 &lt;id&gt;...

    hibernate3.6 文档(pdf 格式)

    1.1.4. Hibernate configuration ............................................................................. 7 1.1.5. Building with Maven .................................................................

    spring-boot-reference.pdf

    16.2. Disabling Specific Auto-configuration Classes 17. Spring Beans and Dependency Injection 18. Using the @SpringBootApplication Annotation 19. Running Your Application 19.1. Running from an IDE ...

Global site tag (gtag.js) - Google Analytics