jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bear Giles <bgi...@coyotesong.com>
Subject Re: How to delete transient repository?
Date Tue, 11 Aug 2009 16:17:35 GMT
Thomas Müller wrote:
> Did you consider using in-memory file system and persistence managers?
>
> Regards,
> Thomas
>   

I finally remembered that TransientRepository resets after each 'last 
session' is closed and my unit test needs to keep a foot-in-the-door 
session open between setup and teardown.  With an in-memory FS and PM I 
can delete the transient repository directory on teardown.

BUT it looks like it's still writing to the FS.  Perhaps because I'm 
only creating extremely small content?  It's not critical as I can run 
the unit tests now, but would like to document the behavior if this is 
expected.

Configuration file:

    
<!DOCTYPE Repository PUBLIC "-//The Apache Software Foundation//DTD 
Jackrabbit 1.5//EN"
                          
"http://jackrabbit.apache.org/dtd/repository-1.5.dtd">

<Repository>
    <FileSystem class="org.apache.jackrabbit.core.fs.mem.MemoryFileSystem"/>
    <Security appName="Jackrabbit">
        <SecurityManager
            
class="org.apache.jackrabbit.core.security.simple.SimpleSecurityManager"
            workspaceName="security" />
        <!--  WorkspaceAccessManager class=... -->
        <!--  <param name="config" value="${rep.home}/security.xml"/> -->
        <AccessManager
            class="org.apache.jackrabbit.core.security.SimpleAccessManager">
            <!--  <param name="config" value="${rep.home}/access.xml"/> -->
        </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.mem.MemoryFileSystem"/>
        <PersistenceManager
            
class="org.apache.jackrabbit.core.persistence.mem.InMemPersistenceManager" 
/>
    </Workspace>

    <Versioning rootPath="${rep.home}/versions">
        <FileSystem 
class="org.apache.jackrabbit.core.fs.mem.MemoryFileSystem"/>
        <PersistenceManager
            
class="org.apache.jackrabbit.core.persistence.mem.InMemPersistenceManager" 
/>
    </Versioning>
</Repository>

Mime
View raw message