Hi, > is it ok to reuse one connection with multiple threads? Is the H2 > connection thread-safe?
I will add the following paragraph to the Javadocs of Connection: * Thread safety: This database is thread-safe, because it synchronizes access * to the connection. However, for compatibility with other databases, a * connection should only be used in one thread at any time. > could it be when I open the database in > the read-only mode? No, because even a read-only database can have state: you can create local temporary tables and variables (SET @X=10 and so on). But you can use multiple connections in read-only mode of course. What is your use case? 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 -~----------~----~----~----~------~----~------~--~---
