I wish to have read only and write connections for sqlite, when I open a write connection, I wish it to have an exclusive lock. This looks like it should work
val config = new SQLiteConfig();
config.setLockingMode(org.sqlite.SQLiteConfig.LockingMode.EXCLUSIVE)
val connection = DriverManager.getConnection("jdbc:sqlite:" + this.getPath() +"\\" + this.dbName, config.toProperties)
but unfortunately I get an exception
Exception in thread "main" java.sql.BatchUpdateException: batch entry 0: query returns results
I have also tried setting the properties directly, rather than using the Sqlite jdbc SQLiteConfig class
val prop = new Properties();
prop.setProperty("locking_mode", "EXCLUSIVE");
Any suggestions?