Multiprocess Applications
Prev | Appendix A. Concurrent Processing in Berkeley DB Java Edition |

## Multiprocess Applications

Note the following if you are writing an application that wants to access JE databases from multiple processes:

- In JE, you must use environments. Further, a database can be opened for write access only if the environment is opened for write access. Finally, only one process may have an environment opened for write access at a time.

- If your process attempts to open an environment for write, and another process has already opened that environment for write, then the open will fail. In this event, the process must either exit or open the environment as read-only.

- A process that opens an environment for read-only receives a snapshot of the data in that environment. If another process modifies the environment's databases in any way, the read-only version of the data will not be updated until the read-only process closes and reopens the environment (and by extension all databases in that environment).

Prev | Up |
Appendix A. Concurrent Processing in Berkeley DB Java Edition | Home |