日期:2014-05-17 浏览次数:20613 次
<session-factory>
<!-- Database connection settings -->
<property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property name="connection.url">jdbcracle:thin:scott/tiger@(description=(address_list=(address=(protocol=tcp)(host=host1)(port=1521)))(source_route=yes)(connect_data=(sid=Ora9i)(SERVICE_NAME = Ora9i)) )</property>
<property name="connection.username">scott</property>
<property name="connection.password">tiger</property>
<!-- JDBC connection pool (use the built-in) -->
<property name="connection.pool_size">1</property>
<!-- SQL dialect -->
<property name="dialect">org.hibernate.dialect.Oracle9Dialect</property>
<!-- Enable Hibernate's automatic session context management -->
<property name="current_session_context_class">thread</property>
<!-- Disable the second-level cache -->
<property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>
<!-- Echo all executed SQL to stdout -->
<property name="show_sql">true</property>
<property name="hbm2ddl.auto">create</property>
<!-- Drop and re-create the database schema on startup -->
<property name="hibernate.default_schema">scott</property>
<mapping resource="Emp.hbm.xml"/>
<!--mapping resource="test100.hbm.xml"-->
</session-factory>