Reputation: 5119
I see some answers about this but they do not point in my direction.
When writing to SQLite all concurrent reads/writes will throw
an exception
.
This is going to be a problem for my setup since i have:
java background service
java Desktop gui application
Both accessing the same SQLite on the same computer.
Is there some global Singelton setup to deal with this.
Any ides would be grate
Upvotes: 0
Views: 121
Reputation: 54242
From the sqlite4java page:
Single-threaded model - each SQLite connection is confined to a single thread, all calls must come from that thread. Application may open several connections to the same database from different threads. Along with the Serializable isolation level from SQLite, this feature facilitates writing very clean and predictable code.
So you need to either:
Upvotes: 1