Ashwin wrote:
However, when multiple Threads retrieve a fresh Connection from the Driver using "jdbc:sqlite:" simultaneously, the DB instance is not shared, but each Thread seems to create its own instance. Could you confirm if this is true?
As of the current version, it is true. Each new connection using the nestedvm driver will create a big bulky Runtime instance. The question is, do we want to change this? While it would be easy to have different Connections sharing a Runtime instance, it means that all access to the Runtime instance must be synchronized. While SQLite can handle multiple threads at once as long as they use different database handles, NestedVM cannot. This would be a problem for people who are trying to use a secondary Connection to run long (like 30 second) queries on the data while not interfering greatly in fast queries that form the standard operation of the program. Of course, these people should be using the native driver, which does not have this trade off and is faster, but people like pure Java. d --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "SQLiteJDBC" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups-beta.google.com/group/sqlitejdbc?hl=en -~----------~----~----~----~------~----~------~--~---
