Using sqlitejdbc with multiple processes

I am trying to run multiple instances of a program accessing a sqlite database in java (always the same file) and I really don't know if it is possible or not that multiple jobs are accessing the same database. ...

+1


a source to share


2 answers


SQLite will essentially take care of the locking and you shouldn't expect concurrency issues. Not everything that comes from SQLite anyway.



Note, however, that this solution is not fully scalable . If this is a problem related to your application, you should check out other DB solutions.

+2


a source


Trying to access the same SQLite database from different processes is fine (whatever language you use) as SQLite will take care of ensuring proper locking. Note, however, that SQLite does not handle lock contention particularly well, so if you have multiple processes constantly accessing the database at the same time, you may need to consider a different database, or use one server to access the database.



+1


a source







All Articles