jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruno Dusausoy <bdusau...@yp5.be>
Subject Re: All in-memory and unit/integration tests
Date Tue, 29 Mar 2011 10:23:25 GMT
On 03/29/2011 11:23 AM, Thomas Mueller wrote:
> Hi,
>
> I'm not sure if the in-memory persistence manager is still supported (it
> has been deprecated). What does work is using an in-memory Java database
> such as the H2 database, and use it as the persistence manager and file
> system. To ensure the data is not deleted between two runs (within the
> same process), you could use the database URL "jdbc:h2:memFS:test" - see
> also http://h2database.com/html/advanced.html#file_system
>
> Also, you should disable the Lucene index. You will still need a
> repository.xml file I believe (not sure if this can be avoided).
>
> Regards,
> Thomas
>

Thanks, Thomas, for your quick answer.
I've put all I could put in H2 (FileSystem, PersistenceManager), but I 
get the same result as before : my data are lost between when I close a 
session and reopen another one.

Did I do something wrong with my configuration ?
Here it is :

<?xml version="1.0"?>
<!DOCTYPE Repository
         PUBLIC "-//The Apache Software Foundation//DTD Jackrabbit 2.0//EN"
         "http://jackrabbit.apache.org/dtd/repository-2.0.dtd">
<Repository>
     <FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
         <param name="driver" value="org.h2.Driver"/>
         <param name="url" value="jdbc:h2:memFS:test"/>
     </FileSystem>
     <DataStore class="org.apache.jackrabbit.core.data.FileDataStore"/>
     <Security appName="Jackrabbit">
         <SecurityManager 
class="org.apache.jackrabbit.core.security.simple.SimpleSecurityManager"
                          workspaceName="security">
         </SecurityManager>
         <AccessManager 
class="org.apache.jackrabbit.core.security.simple.SimpleAccessManager">
         </AccessManager>
         <LoginModule 
class="org.apache.jackrabbit.core.security.simple.SimpleLoginModule">
             <param name="anonymousId" value="anonymous"/>
             <param name="adminId" value="admin"/>
         </LoginModule>
     </Security>
     <Workspaces rootPath="${rep.home}/workspaces" 
defaultWorkspace="default"/>
     <Workspace name="${wsp.name}">
         <FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
             <param name="driver" value="org.h2.Driver"/>
             <param name="url" value="jdbc:h2:memFS:testWsp"/>
         </FileSystem>
         <PersistenceManager 
class="org.apache.jackrabbit.core.persistence.pool.H2PersistenceManager">
             <param name="driver" value="org.h2.Driver"/>
             <param name="url" value="jdbc:h2:mem:itemState"/>
         </PersistenceManager>
     </Workspace>
     <Versioning rootPath="${rep.home}/version">
         <FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
             <param name="driver" value="org.h2.Driver"/>
             <param name="url" value="jdbc:h2:memFS:test/version"/>
         </FileSystem>
         <PersistenceManager 
class="org.apache.jackrabbit.core.persistence.pool.H2PersistenceManager">
             <param name="driver" value="org.h2.Driver"/>
             <param name="url" value="jdbc:h2:mem:version"/>
         </PersistenceManager>
     </Versioning>
</Repository>

Regards.
--
Pensez environnement : limitez l'impression de ce mail.
Please don't print this e-mail unless you really need to.

Mime
View raw message