I'm using Berkeley DB Java Edition(6.3.8), but I'm not sure if the database is supposed to be accessed by one JVM instance. Can two JVM instance access it simultaneously(assume one instance do put and get, and the other do get only)?
Asked
Active
Viewed 166 times
-1
-
The documentation mentions "concurrency" and "locking", doesn't it? – Has QUIT--Anony-Mousse Jun 13 '15 at 22:27
-
@Anony-Mousse yes, thanks. I see "locking" in it's method names, but I still not sure if the database can be accessed by other JVM when the part of data is locked. – realjin Jun 13 '15 at 23:46
-
If it is locked, the other JVM will have to wait until the transaction is complete. – Has QUIT--Anony-Mousse Jun 14 '15 at 08:34
1 Answers
0
No, BDB-JE is an embeddable database, it runs within the JVM running your application and it can be accessed only by this JVM.
See http://www.oracle.com/technetwork/database/berkeleydb/overview/index-093405.html

Peter
- 5
- 4
-
I'm not sure if it is designed for single JVM access only but It seems that other JVM can do Read-Only access for the same database if "setReadOnly(true)" is used on EnvironmentConfig and DatabaseConfig. – realjin Jun 15 '15 at 07:57