| 1 |
<?xml version='1.0' encoding='utf-8'?> |
| 2 |
<!DOCTYPE hibernate-configuration PUBLIC |
| 3 |
"-//Hibernate/Hibernate Configuration DTD 3.0//EN" |
| 4 |
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> |
| 5 |
|
| 6 |
<hibernate-configuration> |
| 7 |
|
| 8 |
<session-factory> |
| 9 |
|
| 10 |
<!-- Database connection settings --> |
| 11 |
<!-- <property name="connection.driver_class">org.hsqldb.jdbcDriver</property> |
| 12 |
<property name="connection.url">jdbc:hsqldb:hsql://localhost/TestDB</property> --> |
| 13 |
|
| 14 |
<property name="connection.driver_class">org.apache.derby.jdbc.EmbeddedDriver</property> |
| 15 |
<property name="connection.url">jdbc:derby:target/derby/hibernateDB;create=true</property> |
| 16 |
<property name="connection.username">user1</property> |
| 17 |
<property name="connection.password">user1</property> |
| 18 |
|
| 19 |
<!-- JDBC connection pool (use the built-in) --> |
| 20 |
<property name="connection.pool_size">1</property> |
| 21 |
|
| 22 |
<!-- SQL dialect --> |
| 23 |
<property name="dialect"> |
| 24 |
org.hibernate.dialect.DerbyDialect |
| 25 |
</property> |
| 26 |
|
| 27 |
<!-- Enable Hibernate's automatic session context management --> |
| 28 |
<property name="current_session_context_class">thread</property> |
| 29 |
|
| 30 |
<property name="cache.use_query_cache">true</property> |
| 31 |
<property name="cache.use_second_level_cache">true</property> |
| 32 |
<property name="cache.use_structured_entries">true</property> |
| 33 |
<property name="cache.region.factory_class">net.sf.ehcache.hibernate.EhCacheRegionFactory</property> |
| 34 |
<property name="net.sf.ehcache.configurationResourceName">/hibernate-config/ehcache.xml</property> |
| 35 |
<!-- Echo all executed SQL to stdout --> |
| 36 |
<property name="show_sql">true</property> |
| 37 |
|
| 38 |
<mapping resource="hibernate-config/domain/Event.hbm.xml" /> |
| 39 |
<mapping resource="hibernate-config/domain/Person.hbm.xml" /> |
| 40 |
<mapping resource="hibernate-config/domain/PhoneNumber.hbm.xml" /> |
| 41 |
<mapping resource="hibernate-config/domain/Account.hbm.xml" /> |
| 42 |
<mapping resource="hibernate-config/domain/HolidayCalendar.hbm.xml" /> |
| 43 |
|
| 44 |
<mapping resource="hibernate-config/domain/Item.hbm.xml" /> |
| 45 |
|
| 46 |
</session-factory> |
| 47 |
|
| 48 |
</hibernate-configuration> |