WP:site
[hibernate4-maven-plugin] / src / it / tutorials-5.2.18 / basic / src / test / resources / hibernate.cfg.xml
1 <?xml version='1.0' encoding='utf-8'?>
2 <!--
3   ~ Hibernate, Relational Persistence for Idiomatic Java
4   ~
5   ~ License: GNU Lesser General Public License (LGPL), version 2.1 or later.
6   ~ See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
7   -->
8 <!DOCTYPE hibernate-configuration PUBLIC
9         "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
10         "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
11
12 <hibernate-configuration>
13
14     <session-factory>
15
16         <!-- Database connection settings -->
17         <property name="connection.driver_class">org.h2.Driver</property>
18         <property name="connection.url">jdbc:h2:${project.build.directory}/db/test;MVCC=TRUE</property>
19         <property name="connection.username">sa</property>
20         <property name="connection.password"/>
21
22         <!-- JDBC connection pool (use the built-in) -->
23         <property name="connection.pool_size">1</property>
24
25         <!-- SQL dialect -->
26         <property name="dialect">org.hibernate.dialect.H2Dialect</property>
27
28         <!-- Disable the second-level cache  -->
29         <property name="cache.provider_class">org.hibernate.cache.internal.NoCacheProvider</property>
30
31         <!-- Echo all executed SQL to stdout -->
32         <property name="show_sql">true</property>
33
34         <!-- Drop and re-create the database schema on startup -->
35         <property name="hbm2ddl.auto">create</property>
36
37         <mapping resource="org/hibernate/tutorial/hbm/Event.hbm.xml"/>
38
39     </session-factory>
40
41 </hibernate-configuration>