Hi,
I'm using spring-data-neo4j, and an embedded database.

I've an instance of embedded database, and an other one in read only mode.

When I access the first one, I can see that a file write.lock is generated, so if I access the second instance, it cannot create the lock file.

Here is the exception stack trace:

Code:
Caused by: java.nio.channels.OverlappingFileLockException
	at sun.nio.ch.FileChannelImpl$SharedFileLockTable.checkList(FileChannelImpl.java:1166)
	at sun.nio.ch.FileChannelImpl$SharedFileLockTable.add(FileChannelImpl.java:1068)
	at sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:868)
	at java.nio.channels.FileChannel.tryLock(FileChannel.java:962)
	at org.apache.lucene.store.NativeFSLock.obtain(NativeFSLockFactory.java:216)
	at org.apache.lucene.store.Lock.obtain(Lock.java:72)
	at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:1108)
	at org.neo4j.index.impl.lucene.LuceneDataSource.getIndexWriter(LuceneDataSource.java:613)
	at org.neo4j.index.impl.lucene.LuceneDataSource.getIndexSearcher(LuceneDataSource.java:508)
	at org.neo4j.index.impl.lucene.LuceneIndex.query(LuceneIndex.java:267)
	at org.neo4j.index.impl.lucene.LuceneIndex.query(LuceneIndex.java:226)
	at org.springframework.data.neo4j.repository.AbstractGraphRepository.getIndexHits(AbstractGraphRepository.java:182)
	at org.springframework.data.neo4j.repository.AbstractGraphRepository.findByPropertyValue(AbstractGraphRepository.java:170)
	at org.springframework.data.neo4j.repository.AbstractGraphRepository.findByPropertyValue(AbstractGraphRepository.java:157)
Here is the declarations:

Project 1:
Code:
<neo4j:config storeDirectory="data/toto.db" />
Project 2:
Code:
<neo4j:config graphDatabaseService="gdbs" />
	
<bean id="gdbs" class="org.neo4j.kernel.EmbeddedReadOnlyGraphDatabase" destroy-method="shutdown">
	<constructor-arg name="storeDir" value="data/toto.db" />
</bean>
Is this normal? Or is this a misuse?

Thanks

Mickael