The guide on clustering pentaho (see here) says:

In order to keep all cluster nodes current with stored Pentaho content and settings, they must share the pentaho-solutions directory.
I have multiple pentaho installations (pentaho1, pentaho2, ...), the folder "pentaho-solution" is stored outside. Within each node, I have a symlink pointing to that pentaho-solutions folder.

The problem: The first node starts fine, the others complain that the Jackrabbit repository is locked (the repository is within a MySQL database, but the search index is still on the filesystem). The Jackrabbit documentation also mentions:
Each cluster node must have its own repository configuration.
Which means (If I understand correctly): I cannot have one repository.xml configuration used by all nodes, but one repository[1-n].xml file for each node (each with its own repository[1-n] subfolder).

My question:
How can I define in the Tomcat configuration (web.xml, context.xml, or property files within WEB-INF/classes), which repository to use?

What I tried:

Adding a new context-param to web.xml with predefined JCR properties (explained for example here)

That doesn't work, since the repository location seems to be hardcoded in repository.spring.xml

<bean id="jcrRepository" class="org.springframework.extensions.jcr.jackrabbit.RepositoryFactoryBean">
    <property name="configuration" value="/jackrabbit/repository.xml"/>
    <property name="homeDir" value="/jackrabbit/repository"/>
Adding a custom system property and reference it in the spring configuration

by adding the following line to repository.spring.xml
<context:property-placeholder local-override="true" ignore-resource-not-found="true"/>
and modify the definition of the jcrRepository-Bean

<bean id="jcrRepository" class="org.springframework.extensions.jcr.jackrabbit.RepositoryFactoryBean">
    <property name="configuration" value="${repository-configuration}"/>
    <property name="homeDir" value=${repository-directory}"/>
This didn't work, since the property names are resolved within pentaho using SystemConfig. Changing the name of the properties just resulted in errors when spring tried to find other properties (e.g. for the datasource).

Adding a custom properties file and reference it in the spring configuration
Another approach was to add my own into WEB-INF/classes with the following two properties
and add the following to repository.spring.xml

<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
        <property name="location" value="" />
This didn't work, since pentaho only searches within pentaho-solutions/system for property files (and this doesn't work, since we share this folder across all nodes).

Define the JCR repository in context.xml

Ok, my last approach was to define the repository in tomcat/conf/Catalina/localhost/pentaho.xml by adding the following resource to the pentaho context

<Resource name="jcr/repository"
Didn't work either.

So, what would be the correct approach?