It is generally possible to override ModeShape 3.1's dependency on Infinispan from the normal 5.1.2.FINAL version to instead use a more recent version of Infinispan. However, when this is done with ModeShape 3.1.0.Final and a clustered cache is created, only the first process is able to properly start up; subsequent processes do not seem to see the repository as being initialized and attempt to re-initialize the repository content and thereby corrupt the repository.
Opening this issue merely as a known-issue. We've traced this to an apparent problem within Infinispan 5.2.0.CR1; see
ISPN-2712 for details. Hopefully this will be fixed before 5.2.0.Final. When it is fixed, we should have to only retest it to verify the problem is fixed. (This can easily be tested by using the standalone test case attached to MODE-1745.)