0

What is the best way to have read-only access a Xodus database (that is already open) that is without Xodus throwing lock error.

The idea is two separate process is accessing the database, one process is with read/write and other is just read only.

quarks
  • 33,478
  • 73
  • 290
  • 513
  • This is the line that throws lock error: final PersistentEntityStore store = PersistentEntityStores.newInstance(xodusRoot + dir); – quarks Sep 26 '18 at 12:40

1 Answers1

1

A single Xodus database can't be shared by multiple processes. From the Xodus wiki:

This method opens an existing database or creates a new database in the directory that is passed as a parameter. It is not possible to share a single database directory between different environments. Any attempt to do this (from within any process, current or not) fails.

There is an open feature request to add this functionality.