Newer
Older
CosmosServer / src / main / 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:mem:sampledb;DB_CLOSE_DELAY=-1;MVCC=TRUE</property>
  19. <property name="connection.username">sa</property>
  20. <property name="connection.password">sa</property>
  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="Group.hbm.xml"/>
  38. <mapping resource="Request.hbm.xml"/>
  39. <mapping resource="User.hbm.xml"/>
  40. <mapping resource="Token.hbm.xml"/>
  41. <mapping resource="Password.hbm.xml"/>
  42. </session-factory>
  43.  
  44. </hibernate-configuration>