jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicolas Dufour" <nrduf...@gmail.com>
Subject Fast Unit Test Repository
Date Sun, 20 Jul 2008 21:09:04 GMT
Hello

I'm preparing a unit testbed for the application I'm maintaining and I would
need to create quickly a jcr repository for that purpose.

For now, I have created a simple repository using as much as possible "in
memory" abilities that way:

<?xml version="1.0" encoding="ISO-8859-1"?>
<Repository>
    <FileSystem class="org.apache.jackrabbit.core.fs.mem.MemoryFileSystem"
/>
    <Security appName="Jackrabbit">
        <AccessManager
            class="org.apache.jackrabbit.core.security.SimpleAccessManager"
/>
        <LoginModule
class="org.apache.jackrabbit.core.security.SimpleLoginModule" />
    </Security>
    <Workspaces rootPath="${rep.home}/workspaces"
        defaultWorkspace="default" />
    <Workspace name="${wsp.name}">
        <FileSystem
class="org.apache.jackrabbit.core.fs.mem.MemoryFileSystem" />
        <PersistenceManager

class="org.apache.jackrabbit.core.persistence.mem.InMemPersistenceManager">
            <param name="persistent" value="false" />
        </PersistenceManager>
    </Workspace>
    <Versioning rootPath="${rep.home}/versions">
        <FileSystem
class="org.apache.jackrabbit.core.fs.mem.MemoryFileSystem" />
        <PersistenceManager

class="org.apache.jackrabbit.core.persistence.mem.InMemPersistenceManager">
            <param name="persistent" value="false" />
        </PersistenceManager>
    </Versioning>
</Repository>

My goal is to have simply a clean jcr repository with no node inside for
each test.

What do you think of that configuration ? Is there another way to make it
faster ? Or only in memory ?
I would deactivate versioning but I know it's not possible ;)

Thank you

-- 
Nicolas Dufour
nrdufour@gmail.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message