Hi,

The documentation at says that you need to configure the file system
so that each cluster node uses it's own storage. However, this doesn't
support adding namespaces after the cluster is started. Probably this
will work with a small change (I'm not sure). Could you test if this
setup works?:

a) Create a new cluster (it's possible to use an existing cluster,
however that's more complicated - you would need to move files).

b) In the repository.xml file, set the repository file system to a
shared directory (or when using the database file system, to a shared
database) that is accessible from all cluster nodes. Only this one
file system (there are three file systems), the one that points to
"${rep.home}/repository":

Before:
    <!--
        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>

After:
    <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
        <param name="path" value="/shared/dir/repository"/>
    </FileSystem>

This should be it. Could you try that? As I wrote, I'm not sure if
that works in all cases however.

Regards,
Thomas


On Tue, Jan 19, 2010 at 2:37 PM, Christian Wurbs
<[email protected]> wrote:
> Hello all,
>
>
>
> I've got an issue with namespace indexes and clustered jackrabbit.
>
>
>
> There are two cluster nodes (Node1 and Node2). Each cluster node has its own
> consistent ns_reg.properties and ns_idx.properties pair. But the pair of
> files differ on the two nodes - for any reason.
>
>
>
> Now there is a Namespace:       http://example.com/product1/property
>
>
>
> Within Node1 this Namespace had the prefix 'prop' and the idx 4
>
> Within Node2 this Namespace had the prefix 'prop' but the idx 8
>
>
>
> Adding and retrieving nodes and properties is working well within the
> cluster nodes.
>
> .         Adding a property prop:Name on Node1 and retrieving it there is
> fine
>
> .         Adding a property prop:Name on Node2 and retrieving it there is
> fine
>
>
>
> But.
>
> .         Retrieving this property on Node2 fails if you access a JCRNode
> that has been modified by Node1
>
> .         The cluster nodes are not capable to build their Search-Indexes
> with wrong or missing indexes => SO the repository does not startup.
>
>
>
> It's even worse when the amount of custom namespaces has changed during
> development - although the NameSpace URI
> (http://example.com/product1/property) stayed consistent.
>
>
>
> So there are some questions:
>
>
>
> 1.       Is it possible to store the NS-URI for an item instead of the
> cluster node local index
>
> 2.       Is it possible to have a global NS-Registry for all cluster nodes
>
> 3.       Is there any chance to come back to a consistent repository
> anymore?
>
> 4.       If you start the repository on a clean directory the
> ns_reg.properties and ns_idx.properties pair gets created. But without the
> custom Namespaces. In order to add custom namespaces you need a session
> object. Which you do not get if your Repository startup failed due to
> exceptions on Search-Index-Creation. Is there any way to register the custom
> namespace before Consistency check and index creation?
>
>
>
> Any help on that would be greatly appreciated.
>
>
>
> Thanks
>
> Christian Wurbs
>
>
>
>
>
>
>
>

Reply via email to