jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Langley <John.Lang...@mathworks.com>
Subject pre-configuring some workspaces with repository.xml
Date Wed, 15 Sep 2010 21:17:19 GMT
I would like to pre-configure some workspaces (specifically the security
one) by just modifying repository.xml

What I need to do is configure the default workspace to have indexing
turned off but LEAVE indexing on in the security workspace. 

The way our product currently works, the workspaces are all configured
automatically by jackrabbit when it first "wakes up". 

So my question is... Is there a way to "hardcode" the configuration for
a specific workspace in repository.xml? 

My "ideal" solution would just have a repository.xml with the following
workspace definitions in it. 

    <Workspaces rootPath="${rep.home}/workspaces"
defaultWorkspace="default"/>
    <!--
        workspace configuration template:
        used to create the initial workspace if there's no workspace yet
    -->
    <Workspace name="${wsp.name}">

        <!--
            virtual file system of the workspace:
            class: FQN of class implementing the FileSystem interface
        -->
        <FileSystem
class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
            <param name="path" value="${wsp.home}"/>
        </FileSystem>
        <!--
            persistence manager of the workspace:
            class: FQN of class implementing the PersistenceManager
interface
        -->
        <PersistenceManager
class="org.apache.jackrabbit.core.persistence.pool.MySqlPersistenceManager">
            <param name="dataSourceName" value="ds1"/>
            <param name="schemaObjectPrefix" value="pm_${wsp.name}_" />
        </PersistenceManager>

        <!--
            Search index and the file system it uses.
            class: FQN of class implementing the QueryHandler interface
        -->
	<!-- ---------- Commented out for the default workspace...
        <SearchIndex
class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
            <param name="path" value="${wsp.home}/index"/>
            <param name="supportHighlighting" value="true"/>
        </SearchIndex>
	--> 

    </Workspace>

   <!-- Hard coded configuration for this workspace --> 
   <Workspace name="security">

        <!--
            virtual file system of the workspace:
            class: FQN of class implementing the FileSystem interface
        -->
        <FileSystem
class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
            <param name="path" value="${wsp.home}"/>
        </FileSystem>
        <!--
            persistence manager of the workspace:
            class: FQN of class implementing the PersistenceManager
interface
        -->
        <PersistenceManager
class="org.apache.jackrabbit.core.persistence.pool.MySqlPersistenceManager">
            <param name="dataSourceName" value="ds1"/>
            <param name="schemaObjectPrefix" value="pm_security_" />
        </PersistenceManager>

        <!--
            Search index and the file system it uses.
            class: FQN of class implementing the QueryHandler interface
        -->
        <SearchIndex
class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
            <param name="path" value="${wsp.home}/index"/>
            <param name="supportHighlighting" value="true"/>
        </SearchIndex>

    </Workspace>

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