2 messages in org.apache.jackrabbit.usersRe: Embedded Jackrabbit and HSQLDB
FromSent OnAttachments
lopromanOct 23, 2007 6:12 pm 
Stefan GuggisbergOct 25, 2007 7:13 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: Embedded Jackrabbit and HSQLDBActions...
From:Stefan Guggisberg (stef@gmail.com)
Date:Oct 25, 2007 7:13:37 am
List:org.apache.jackrabbit.users

On 10/24/07, loproman <lopr@gmail.com> wrote:

Hello,

I want to run Jackrabbit in embedded mode and have it use HSQLDB for persistence. HSQLDB will also be running in embedded (or as they call it standalone) mode. So far, I believe this can work, but my concern is that the DB being embedded may cause some issues.

that's not a problem since jackrabbit's current default configuration uses embedded (i.e. in-proc) derby db's.

I'm wondering if anyone might be able to share a success story having already achieved this, or provide any helpful advice on this topic.

although not 'officially' supported you can try the following config:

<PersistenceManager class="org.apache.jackrabbit.core.persistence.db.SimpleDbPersistenceManager"> <param name="url" value="jdbc:hsqldb:file:${wsp.home}/db/itemState"/> <param name="driver" value="org.hsqldb.jdbcDriver"/> <param name="user" value="sa"/> <param name="password" value=""/> <param name="schema" value="default"/> <param name="schemaObjectPrefix" value="${wsp.name}_"/> <param name="externalBLOBs" value="false"/> </PersistenceManager>

however, there's one caveat: you should properly shutdown the embedded db. you can do this by subclassing SimpleDbPersistenceManager and overriding the close() method.

cheers stefan