[size=medium]<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE hibernate-configuration (View Source for full doctype...)>
- <!-- Generated by MyEclipse Hibernate Tools.
--> - <!-- 以上几行所有的hibernate.cfg.xml都相同
--> [url=file:///C:/Documents%20and%20Settings/Administrator/桌面/hibernate.cfg.xml#]-[/url] <hibernate-configuration>
[url=file:///C:/Documents%20and%20Settings/Administrator/桌面/hibernate.cfg.xml#]-[/url] <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>[/size]
- <!-- Generated by MyEclipse Hibernate Tools.
--> - <!-- 以上几行所有的hibernate.cfg.xml都相同
--> [url=file:///C:/Documents%20and%20Settings/Administrator/桌面/hibernate.cfg.xml#]-[/url] <hibernate-configuration>
[url=file:///C:/Documents%20and%20Settings/Administrator/桌面/hibernate.cfg.xml#]-[/url] <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>[/size]