Hi, > Is there no synchronization even if Each "thread"(not "process") > connect to embedded database?
You are right, there is synchronization, even though it is not always required. H2 currently works like this: The first connection to a database opens it. The second connection will use the same database objects (the database objects are shared among the sessions that are connected). Usually this is good because it saves memory: you only need one cache. But access to the database is also synchronized. For read-only databases, this synchronization is technically not required. What about if I add a new feature to open a database in read only mode, but not share it with other connections? If the same database is opened from two sessions, it would need more memory, but it wouldn't be synchronized. What about using a new connection property PRIVATE for this? So if you want to open a connection to a read-only database, and you don't want to share the database with other connections, you would use the database URL jdbc:h2:~/test;PRIVATE=TRUE. Is this what you are looking for? Regards, Thomas --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "H2 Database" 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.google.com/group/h2-database?hl=en -~----------~----~----~----~------~----~------~--~---
