Are you calling BeginTransaction?
Make sure that the servlet isn't configured as a single threaded servlet.
The servlet is configured in multithread, and moreover during the execution of the servlet which makes a long SQLITE ExecQuery, I can execute without problem the same servlet in parallel for treatments without access to the SQLITE. However, as soon as there is an access to the database, the query seems to be put on hold until the previous query is finished. I don't use the BeginTransaction (only reads ExecQuery for this servlet)
I followed the recommendations of
SQLite databases are very easy to use as they don't require any additional software or configuration. SQLite support for concurrent access is not comparable to server based databases such as MySQL and others. However they can still be perfect for small / medium solutions, especially if there...
"- Use a single SQL object that is shared by all classes. Do not use a ConnectionPool with a SQLite database.
"- When you create the database, you must set the log mode to wal "
"This mode allows multiple readers and a single writer to access the database at the same time."
So in Main before the server starts the SQL object is declared and then initialized by an InitializeSQLite. Then all servlets use this SQL object referencing main.sql1 to access the database. But in my case, the queries (read access) seem to be put on hold.
I made a test where in each servlet I create a SQL object, initializeSQLITE , Execquery, and close object . Everything is fine, short queries can be executed during a long query without being put on hold.
So what is the right writing for using a SQLITE database in servlets ?