|
Hibernate example source code file (hibernate.cfg.xml)
The Hibernate hibernate.cfg.xml source code
<?xml version='1.0' encoding='utf-8'?>
<!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.hsqldb.jdbcDriver
<property name="connection.url">jdbc:hsqldb:hsql://localhost
<property name="connection.username">sa
<property name="connection.password">
<!-- JDBC connection pool (use the built-in) -->
<property name="connection.pool_size">1
<!-- SQL dialect -->
<property name="dialect">org.hibernate.dialect.HSQLDialect
<!-- Enable Hibernate's automatic session context management -->
<property name="current_session_context_class">thread
<!-- Disable the second-level cache -->
<property name="cache.provider_class">org.hibernate.cache.internal.NoCacheProvider
<!-- Echo all executed SQL to stdout -->
<property name="show_sql">true
<!-- Drop and re-create the database schema on startup -->
<property name="hbm2ddl.auto">update
<mapping resource="org/hibernate/tutorial/domain/Event.hbm.xml"/>
</session-factory>
</hibernate-configuration>
Other Hibernate examples (source code examples)Here is a short list of links related to this Hibernate hibernate.cfg.xml source code file: |
| ... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.