The documentation says that connecting to the JDBC URL "jdbc:h2:mem:" creates a "private" in-memory database.Is the database so created private to the thread that creates it?
jdbc:h2:mem: Opening two connections within the same virtual machine means opening two different (private) databases."--
You received this message because you are subscribed to the Google Groups "H2 Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to h2-database...@googlegroups.com.
To post to this group, send email to h2-da...@googlegroups.com.
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/groups/opt_out.
I think the documentation is quite clear.
It will be 2.
and the second create table will fail because the table already exists.
But I don't see how that has anything to do with being thread safe?
The in memory database is per process, so all threads access the same database.
If you want a separate database per thread then give the databases different names.
--