On 1/24/06, Brian Moseley <[EMAIL PROTECTED]> wrote:
> On 1/24/06, Giota Karadimitriou <[EMAIL PROTECTED]> wrote:
> > For me at this point it would be best to use one db. I tried this with
> > embedded Derby and seems to work ok; I just wanted some extra opinion
> > just to verify I am on the right track:
>
> what does your repository.xml look like? i was never able to get it a
> one-db configuration to work with embedded derby.
>
i attached a repository.xml that stores everything in a single derby db.
note that i only had to change *two* lines in the example repository.xml
found in jackrabbit/src/main/config:
i changed to "url" param of the Workspace PersistenceManager to:
<param name="url" value="jdbc:derby:${rep.home}/db;create=true"/>
i changed to "url" param of the Versioning PersistenceManager to:
<param name="url" value="jdbc:derby:${rep.home}/db;create=true"/>
cheers
stefan
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE Repository [
<!--
the Repository element configures a repository instance;
individual workspaces of the repository are configured through
separate configuration files called workspace.xml which are
located in a subfolder of the workspaces root directory
(see Workspaces element).
it consists of
a FileSystem element (the virtual file system
used by the repository to persist global state such as
registered namespaces, custom node types, etc..
a Security element that specifies the name of the app-entry
in the JAAS config and the access manager
a Workspaces element that specifies the location of the
workspaces root directory, the name of the default workspace,
the maximum idle time before a workspace is automatically
shutdown (optional) and the workspace configuration root directory
within the virtual repository file system (optional)
a Workspace element that is used as a workspace configuration
template; it is used to create the initial workspace if there's
no workspace yet and for creating additional workspaces through
the api
a Versioning element that is used for configuring
versioning-related settings
a SearchIndex element that is used for configuring Indexing-related
settings on the /jcr:system tree.
-->
<!ELEMENT Repository (FileSystem,Security,Workspaces,Workspace,Versioning,SearchIndex?)>
<!--
a virtual file system
-->
<!ELEMENT FileSystem (param*)>
<!ATTLIST FileSystem
class CDATA #REQUIRED>
<!--
the Security element specifies the name (appName attribute)
of the JAAS configuration app-entry for this repository.
it also specifies the access manager to be used (AccessManager element).
-->
<!ELEMENT Security (AccessManager, LoginModule?)>
<!ATTLIST Security
appName CDATA #REQUIRED>
<!--
the AccessManager element configures the access manager to be used by
this repository instance; the class attribute specifies the FQN of the
class implementing the AccessManager interface
-->
<!ELEMENT AccessManager (param*)>
<!ATTLIST AccessManager
class CDATA #REQUIRED>
<!--
generic parameter (name/value pair)
-->
<!ELEMENT param EMPTY>
<!ATTLIST param
name CDATA #REQUIRED
value CDATA #REQUIRED>
<!--
the LoginModule element optionally specifies a JAAS login module to
authenticate users. This feature allows the use of Jackrabbit in a
non-JAAS environment.
-->
<!ELEMENT LoginModule (param*)>
<!ATTLIST LoginModule
class CDATA #REQUIRED>
<!--
the Workspaces element specifies the physical workspaces root directory
(rootPath attribute), the name of the default workspace
(defaultWorkspace attribute), the (optional) maximum amount of time in
seconds before an idle workspace is automatically shutdown
(maxIdleTime attribute) and the (optional) workspace configuration
root directory within the virtual repository file system (configRootPath
attribute).
individual workspaces are configured through individual workspace.xml
files located in a subfolder each of either
a) the physical workspaces root directory
or, if configRootPath had been specified,
b) the configuration root directory within the virtual repository file system.
-->
<!ELEMENT Workspaces EMPTY>
<!ATTLIST Workspaces
rootPath CDATA #REQUIRED
defaultWorkspace CDATA #REQUIRED
configRootPath CDATA #IMPLIED
maxIdleTime CDATA #IMPLIED>
<!--
the Workspace element serves as a workspace configuration template;
it is used to create the initial workspace if there's no workspace yet
and for creating additional workspaces through the api
-->
<!ELEMENT Workspace (FileSystem,PersistenceManager,SearchIndex?)>
<!ATTLIST Workspace
name CDATA #REQUIRED>
<!--
the PersistenceManager element configures the persistence manager
to be used for the workspace; the class attribute specifies the
FQN of the class implementing the PersistenceManager interface
-->
<!ELEMENT PersistenceManager (param*)>
<!ATTLIST PersistenceManager
class CDATA #REQUIRED>
<!--
the SearchIndex element specifies the locaction of the search index
(used by the QueryHandler); the class attribute specifies the
FQN of the class implementing the QueryHandler interface.
-->
<!ELEMENT SearchIndex (param*,FileSystem?)>
<!ATTLIST SearchIndex
class CDATA #REQUIRED>
<!--
the Versioning element configures the persistence manager
to be used for persisting version state
-->
<!ELEMENT Versioning (FileSystem, PersistenceManager)>
<!ATTLIST Versioning
rootPath CDATA #REQUIRED
>
]>
<!-- Example Repository Configuration File -->
<Repository>
<!--
virtual file system where the repository stores global state
(e.g. registered namespaces, custom node types, etc.)
-->
<FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
<param name="path" value="${rep.home}/repository"/>
</FileSystem>
<!--
security configuration
-->
<Security appName="Jackrabbit">
<!--
access manager:
class: FQN of class implementing the AccessManager interface
-->
<AccessManager class="org.apache.jackrabbit.core.security.SimpleAccessManager">
<!-- <param name="config" value="${rep.home}/access.xml"/> -->
</AccessManager>
<LoginModule class="org.apache.jackrabbit.core.security.SimpleLoginModule">
<!-- anonymous user name ('anonymous' is the default value) -->
<param name="anonymousId" value="anonymous"/>
</LoginModule>
</Security>
<!--
location of workspaces root directory and name of default workspace
-->
<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.state.db.DerbyPersistenceManager">
<param name="url" value="jdbc:derby:${rep.home}/db;create=true"/>
<param name="schemaObjectPrefix" value="${wsp.name}_"/>
<param name="externalBLOBs" value="false"/>
</PersistenceManager>
<!--
Search index and the file system it uses.
class: FQN of class implementing the QueryHandler interface
If required by the QueryHandler implementation, one may configure
a FileSystem that the handler may use.
Supported parameters for lucene search index:
- path: location of the index. This parameter is mandatory!
- useCompoundFile: advises lucene to use compound files for the index files
- minMergeDocs: minimum number of nodes in an index until segments are merged
- volatileIdleTime: idle time in seconds until the volatile index is
moved to persistent index even though minMergeDocs is not reached.
- maxMergeDocs: maximum number of nodes in segments that will be merged
- mergeFactor: determines how often segment indices are merged
- bufferSize: maximum number of documents that are held in a pending
queue until added to the index
- cacheSize: size of the document number cache. This cache maps
uuids to lucene document numbers
- forceConsistencyCheck: runs a consistency check on every startup. If
false, a consistency check is only performed when the search index
detects a prior forced shutdown.
- autoRepair: errors detected by a consistency check are automatically
repaired. If false, errors are only written to the log.
- analyzer: class name of a lucene analyzer to use for fulltext indexing of text.
- queryClass: class name that implements the javax.jcr.query.Query interface.
this class must extend the class: org.apache.jackrabbit.core.query.AbstractQueryImpl
- idleTime: idle time in seconds after which an unused query handler is shut down.
If the query handler is later used again it is automatically started.
Default value -1 disables this feature.
- respectDocumentOrder: If true and the query does not contain an 'order by' clause,
result nodes will be in document order. For better performance when queries return
a lot of nodes set to 'false'.
Note: all parameters (except path) in this SearchIndex config are default
values and can be omitted.
-->
<SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
<param name="path" value="${wsp.home}/index"/>
<param name="useCompoundFile" value="true"/>
<param name="minMergeDocs" value="100"/>
<param name="volatileIdleTime" value="3"/>
<param name="maxMergeDocs" value="100000"/>
<param name="mergeFactor" value="10"/>
<param name="bufferSize" value="10"/>
<param name="cacheSize" value="1000"/>
<param name="forceConsistencyCheck" value="false"/>
<param name="autoRepair" value="true"/>
<param name="analyzer" value="org.apache.lucene.analysis.standard.StandardAnalyzer"/>
<param name="queryClass" value="org.apache.jackrabbit.core.query.QueryImpl"/>
<param name="idleTime" value="-1"/>
<param name="respectDocumentOrder" value="true"/>
</SearchIndex>
</Workspace>
<!--
Configures the versioning
-->
<Versioning rootPath="${rep.home}/version">
<!--
Configures the filesystem to use for versioning for the respective
persistence manager
-->
<FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
<param name="path" value="${rep.home}/version"/>
</FileSystem>
<!--
Configures the perisistence manager to be used for persisting version state.
Please note that the current versioning implementation is based on
a 'normal' persistence manager, but this could change in future
implementations.
-->
<PersistenceManager class="org.apache.jackrabbit.core.state.db.DerbyPersistenceManager">
<param name="url" value="jdbc:derby:${rep.home}/db;create=true"/>
<param name="schemaObjectPrefix" value="version_"/>
<param name="externalBLOBs" value="false"/>
</PersistenceManager>
</Versioning>
<!--
Search index for content that is shared repository wide
(/jcr:system tree, contains mainly versions)
The same parameters are supported as in the search index configuration
inside the workspace definition element.
This element is optional. If omitted, the /jcr:system tree will not be
indexed and no results will be returned for that tree!
-->
<SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
<param name="path" value="${rep.home}/repository/index"/>
</SearchIndex>
</Repository>