hibernate.cfg.xml

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
          "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
          "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">


<!-- Generated by MyEclipse Hibernate Tools.                   -->
<hibernate-configuration>


	<session-factory>
		<!-- 数据库的配置 -->
		<property name="connection.username">scott</property>
		<property name="connection.url">
			jdbc:oracle:thin:@127.0.0.1:1521:ora92
		</property>
		<property name="dialect">
			org.hibernate.dialect.Oracle9Dialect
		</property>
		<property name="myeclipse.connection.profile">oracle</property>
		<property name="connection.password">tiger</property>
		<property name="connection.driver_class">
			oracle.jdbc.driver.OracleDriver
		</property>
		
		<!-- 开发阶段的配置 -->
		<property name="show_sql">true</property>
		<property name="hbm2ddl.auto">update</property>
	
		<!-- 二级缓存配置 -->
		<property name="cache.use_second_level_cache">true</property>
		<property name="cache.use_query_cache">false</property>
		<property name="cache.provider_class">org.hibernate.cache.EhCacheProvider</property>
	   


		<!-- 连接池配置 -->
		<property name="connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property>
		<property name="hibernate.c3p0.max_size">50</property>
		<property name="hibernate.c3p0.min_size">5</property>
		<property name="hibernate.c3p0.idle_test_period">60</property>
		<property name="hibernate.c3p0.max_statements">100</property>
		<property name="c3p0.acquire_increment">5</property>
		<property name="hibernate.c3p0.timeout">60</property>


		<mapping resource="hwt/pojo/Articles.hbm.xml" />


	</session-factory>


</hibernate-configuration>


你可能感兴趣的:(hibernate.cfg.xml)