<
From version < 1.5 >
edited by Vincent Massol
on 2007/07/10
To version < 2.1 >
edited by blaine
on 2008/06/20
>
Change comment: Document some useful configurations for HSQLDB. I am a core HSQLDB developer.

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.VincentMassol
1 +XWiki.blaine
Content
... ... @@ -14,4 +14,17 @@
14 14  {code}
15 15  
16 16  where <tt>\[DATABASE_LOCATION\]</tt> is where you wish to put the HSQL database. For example <tt>/apps/xwiki-database/xwiki</tt>.
17 -
17 +* You can use a remote HSQLDB database instead of embedding it. To do this, juse use a URL like "jdbc:hsqldb:hsql:HOSTNAME..." instead of the "jdbcc:hsqldb:file:.." URL.
18 +* If you want to use your app server facilities to manage your data sources (generally a better strategy), then
19 +** Put the hsqldb*.jar file into your app server class path instead of in your web app (like in <tt>$CATALINA_HOME/common/lib</tt>).
20 +** Use <tt>hibernate.cfg.xml</tt> settings like this:
21 +{code}
22 +<property name="connection.url">DUMMY</property>
23 +<property name="connection.username">DUMMY</property>
24 +<property name="connection.password">DUMMY</property>
25 +<property name="connection.driver_class">DUMMY</property>
26 +<!-- I haven't had time to check whether the dummy settings are needed. I know they are needed with a setup for a similar product. You're welcome to update this text if you test and verify they're unnecessary. -->
27 +<property name="dialect">org.hibernate.dialect.HSQLDialect</property>
28 +<property name="connection.datasource">java:/comp/env/jdbc/xwikiDs</property>
29 +{code}
30 +** Then you manage the data source using app server facilities. With Tomcat, for example, you would map the ~~resource link~~ <tt>jcbc/xwikiDs</tt> to a container-managed data source using the Admin web app or by editing the file <tt>conf/Catalina/*/xwiki.xml</tt> (i.e. webapp-name + ".xml").

Get Connected