title: How to initialize in-memory HSQLDB using script via Spring
body: <p>I am attempting to do unit testing of my DAO (using Spring and Hibernate). I am using HSQLDB per <a href="http://www.informit.com/guides/content.aspx?g=java&amp;seqNum=507" rel="noreferrer">this</a> tutorial. The tutorial states that the in-memory HSQLDB database can be initialized using a SQL script but I cannot find information on how to do so in Spring. Here is the pertinent Spring context config:</p>
  
  <pre class="lang-xml prettyprint-override"><code> &lt;bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"&gt;
      &lt;property name="driverClassName" value="org.hsqldb.jdbcDriver" /&gt;
      &lt;property name="url" value="jdbc:hsqldb:mem:mydb" /&gt;
      &lt;property name="username" value="sa" /&gt;
      &lt;property name="password" value="" /&gt;
      &lt;property name="initialSize" value="5" /&gt;
      &lt;property name="maxActive" value="10" /&gt;
      &lt;property name="poolPreparedStatements" value="true" /&gt;
      &lt;property name="maxOpenPreparedStatements" value="10" /&gt;
  &lt;/bean&gt; 
  </code></pre>
  
  <p>Any help would be appreciated. Thanks.</p>