Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I use the following configuration (directly inspired by the <a href="http://docs.jboss.org/hibernate/core/3.3/reference/en/html/tutorial.html#tutorial-firstapp-configuration" rel="noreferrer">Hibernate tutorial</a>) without any problem:</p> <pre><code>&lt;hibernate-configuration&gt; &lt;session-factory&gt; &lt;!-- Database connection settings --&gt; &lt;property name="hibernate.connection.driver_class" value="org.hsqldb.jdbcDriver"/&gt; &lt;property name="hibernate.connection.url" value="jdbc:hsqldb:mem:foobar"/&gt; &lt;property name="hibernate.connection.username" value="sa"/&gt; &lt;property name="hibernate.connection.password" value=""/&gt; &lt;!-- JDBC connection pool (use the built-in) --&gt; &lt;property name="connection.pool_size"&gt;1&lt;/property&gt; &lt;!-- SQL dialect --&gt; &lt;property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/&gt; &lt;!-- Enable Hibernate's automatic session context management --&gt; &lt;property name="current_session_context_class"&gt;thread&lt;/property&gt; &lt;!-- Disable the second-level cache --&gt; &lt;property name="cache.provider_class"&gt;org.hibernate.cache.NoCacheProvider&lt;/property&gt; &lt;!-- Echo all executed SQL to stdout --&gt; &lt;property name="show_sql"&gt;true&lt;/property&gt; &lt;!-- Drop and re-create the database schema on startup --&gt; &lt;property name="hibernate.hbm2ddl.auto" value="update"/&gt; &lt;mapping resource="..."/&gt; &lt;/session-factory&gt; &lt;/hibernate-configuration&gt; </code></pre> <p>When using an in-memory HSQLDB, there is no need to start anything explicitly. Just use the <code>mem:</code> protocol and the in-memory database will get started from JDBC. </p> <h3>See also</h3> <ul> <li><a href="http://www.theserverside.com/news/1365222/Unit-Testing-Hibernate-With-HSQLDB" rel="noreferrer">Unit-Testing Hibernate With HSQLDB</a></li> </ul>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload