hibernate.cfg.xml关联Oracle数据库的配置
2010-01-20 16:20
477 查看
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE hibernate-configuration (View Source for full doctype...)> - <!-- Generated by MyEclipse Hibernate Tools. --> - <!-- 以上几行所有的hibernate.cfg.xml都相同 --> - <hibernate-configuration> - <session-factory> - <!-- 指定连接数据库的URL以及要连接的数据库 --> <property name="connection.url">jdbc:oracle:thin:@127.0.0.1:1521:sryx</property> - <!-- 连接数据库的用户名 --> <property name="connection.username">yf</property> - <!-- 连接数据库的密码 --> <property name="connection.password">yf</property> - <!-- 指定连接数据库的驱动 --> <property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property> - <!-- 指定连接的数据库类型 --> <property name="dialect">org.hibernate.dialect.Oracle9Dialect</property> - <!-- JDBC从数据库每次读取的记录数 100还将优化 --> <property name="jdbc.fetch_size">50</property> - <!-- JDBC执行批量删除,更新,插入时每次操作的记录数 30到50吧 --> <property name="jdbc.batch_size">50</property> - <!-- connection是否滚动结果集 --> <property name="jdbc.use_scrollable_resultset">true</property> - <!-- 在生成的SQL语句中产生注释 --> <property name="use_sql_comments">true</property> - <!-- 连接SQLSERVER2000用 <session-factory name="java:/hibernate/HibernateFactory"> <property name="show_sql">true</property> <property name="connection.driver_class">com.microsoft.jdbc.sqlserver.SQLServerDriver</property> <property name="connection.url">jdbc:microsoft:sqlserver://127.0.0.1:1433;databasename=hibernate_test</property> <property name="connection.username">sa</property> <property name="connection.password">sa</property> <property name="dialect">org.hibernate.dialect.SQLServerDialect</property> </session-factory> --> - <!-- --> <property name="connection.datasource">java:comp/env/jdbc/dbConnPool</property> - <!-- 在控制台显示sql语句 --> <property name="show_sql">true</property> - <!-- 支持中文查询 --> <property name="query.factory_class">org.hibernate.hql.ast.ASTQueryTranslatorFactory</property> <property name="jdbc.use_streams_for_binary">true</property> <mapping resource="sunray/db/pojo/Appendage.hbm.xml" /> 。。。。。。 </session-factory> </hibernate-configuration>
相关文章推荐
- hibernate.cfg.xml关联Oracle数据库的配置
- hibernate.cfg.xml配置文件,连接oracle数据库和mysql 数据库
- hibernate.cfg.xml配置文件
- Hibernate的主配置文件hibernate.cfg.xml
- Hibernate的主配置文件hibernate.cfg.xml
- Hibernate hibernate.cfg.xml 基本配置 和 .hbm.xml基本配置
- Hibernate(3)配置文件hibernate.cfg.xml
- hibernate 配置 hibernate.cfg.xml
- Hibernate配置文件之hibernate.cfg.xml
- Hibernate.cfg.xml 主配置
- Hibernate中Oracle的配置——即hibernate.cfg.xml
- Hibernate.cfg.xml配置文件解析
- hibernate.cfg.xml配置
- Spring整合Hibernate配置(使用hibernate.cfg.xml文件)
- 6 用Properties补充hibernate.cfg.xml配置
- Hibernate配置文件(.cfg.xml)参考实例
- hibernate.cfg.xml配置文件分析
- Hibernate.cfg.xml配置总结
- hibernate 树状自关联 *.hbm.xml 配置
- Hibernate.cfg.xml的配置