title: Using HSQL in-memory database as JPA datasource
body: <p>I have an in-memory data source:</p>
  
  <pre><code>java.sql.Connection c = DriverManager.getConnection("jdbc:hsqldb:mem:testdb", "sa", "");            
  emf = Persistence.createEntityManagerFactory("manager");
  </code></pre>
  
  <p>But now I'm stuck. I want to use it as a JPA data source in a J2SE application. I've scoured the entire web but all info is related to J2EE.</p>
  
  <pre><code>&lt;persistence xmlns="http://java.sun.com/xml/ns/persistence"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
      version="2.0"&gt;
  
      &lt;persistence-unit name="manager"&gt;
  
          &lt;jta-data-source&gt;/*What to enter here?*/&lt;/jta-data-source&gt;
  
          &lt;properties&gt;
  
              &lt;property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect" /&gt;
              &lt;property name="hibernate.hbm2ddl.auto" value="create-drop" /&gt;
  
          &lt;/properties&gt;
  
      &lt;/persistence-unit&gt;
  
  &lt;/persistence&gt;
  </code></pre>