summaryrefslogtreecommitdiffstats
path: root/java-hibernate/cfg/annotations/hibernate.cfg.xml
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2011-11-22 16:50:58 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2011-11-22 16:50:58 +0100
commitdcda71cc643a628704b4d5840ed35d6552cbc69b (patch)
treeeea9cdeca1ad4e7626bb71edb62efd54234d410d /java-hibernate/cfg/annotations/hibernate.cfg.xml
parentbe38a2ce3ce51b46cb28c19cc20f178cc5b63169 (diff)
downloadskeletons-dcda71cc643a628704b4d5840ed35d6552cbc69b.zip
skeletons-dcda71cc643a628704b4d5840ed35d6552cbc69b.tar.gz
add java-hibernate test
Diffstat (limited to 'java-hibernate/cfg/annotations/hibernate.cfg.xml')
-rw-r--r--java-hibernate/cfg/annotations/hibernate.cfg.xml59
1 files changed, 59 insertions, 0 deletions
diff --git a/java-hibernate/cfg/annotations/hibernate.cfg.xml b/java-hibernate/cfg/annotations/hibernate.cfg.xml
new file mode 100644
index 0000000..43c0bdd
--- /dev/null
+++ b/java-hibernate/cfg/annotations/hibernate.cfg.xml
@@ -0,0 +1,59 @@
+<?xml version='1.0' encoding='utf-8'?>
+<!--
+ ~ Hibernate, Relational Persistence for Idiomatic Java
+ ~
+ ~ Copyright (c) 2010, Red Hat Inc. or third-party contributors as
+ ~ indicated by the @author tags or express copyright attribution
+ ~ statements applied by the authors. All third-party contributions are
+ ~ distributed under license by Red Hat Inc.
+ ~
+ ~ This copyrighted material is made available to anyone wishing to use, modify,
+ ~ copy, or redistribute it subject to the terms and conditions of the GNU
+ ~ Lesser General Public License, as published by the Free Software Foundation.
+ ~
+ ~ This program is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ ~ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ ~ for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public License
+ ~ along with this distribution; if not, write to:
+ ~ Free Software Foundation, Inc.
+ ~ 51 Franklin Street, Fifth Floor
+ ~ Boston, MA 02110-1301 USA
+ -->
+<!DOCTYPE hibernate-configuration PUBLIC
+ "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
+ "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
+
+<hibernate-configuration>
+
+ <session-factory>
+
+ <!-- Database connection settings -->
+ <property name="connection.driver_class">org.h2.Driver</property>
+ <property name="connection.url">jdbc:h2:mem:db1;DB_CLOSE_DELAY=-1;MVCC=TRUE</property>
+ <property name="connection.username">sa</property>
+ <property name="connection.password"></property>
+
+ <!-- JDBC connection pool (use the built-in) -->
+ <property name="connection.pool_size">1</property>
+
+ <!-- SQL dialect -->
+ <property name="dialect">org.hibernate.dialect.H2Dialect</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>
+
+ <!-- Drop and re-create the database schema on startup -->
+ <property name="hbm2ddl.auto">create</property>
+
+ <!-- Names the annotated entity class -->
+ <mapping class="ch.asynk.hibernate.annotations.Event"/>
+
+ </session-factory>
+
+</hibernate-configuration>